Function at 0x40b010
Capabilities:
Accept command line arguments
Check if file exists
Create thread
Enumerate files on windows
Get file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41ad7c
push eax
mov eax, 0x2bd0
mov dword fs:[0], esp
call fcn.0040e740
push ebp
push edi
xor ebp, ebp
mov ecx, 0x7ff
xor eax, eax
lea edi, [esp + 0xbda]
mov word [esp + 0xbd8], bp
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, 0x6c
mov dword [esp + 0x2c], ebp
mov word [esp + 0x5c], ax
mov word [esp + 0x5e], ax
lea eax, [esp + 0x9d4]
mov word [esp + 0x50], 0x5c
push eax
push ebp
mov word [esp + 0x5a], 0x50
mov word [esp + 0x5c], 0x59
mov word [esp + 0x5e], 0x47
mov word [esp + 0x60], 0x2e
mov word [esp + 0x62], 0x64
mov word [esp + 0x68], bp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x9d0]
lea edx, [esp + 0x6c8]
push ecx
push edx
call fcn.0040e29f
lea eax, [esp + 0x6d0]
push 0x5c
push eax
call fcn.0040e235
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x6d8]
push ecx
push edx
mov word [eax], bp
call fcn.0040e275
add esp, 0x18
lea eax, [esp + 0x6c8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40bb46
push ebp
push ebp
push ebp
push 0x40bbd0
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
push ebp
mov dword [esp + 0x24], eax
call dword [sym.imp.ole32.dll_CoInitialize]
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebp
push 0x406ed0
mov dword [0x429e80], eax
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov edx, dword [0x429e80]
push eax
push 0x66
push edx
call dword [sym.imp.USER32.dll_CreateDialogParamW]
cmp eax, ebp
mov dword [0x42a350], eax
je 0x40b176
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x42a350]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov ecx, dword [0x42a350]
push ecx
call dword [sym.imp.USER32.dll_SetFocus]
mov dl, byte [esp + 0xb]
push esi
mov byte [esp + 0x30], dl
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x2be4], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x90], ebp
mov dword [esp + 0x94], ebp
mov dword [esp + 0x98], ebp
mov dword [esp + 0x9c], ebp
mov dword [esp + 0xa0], ebp
mov dword [esp + 0xa4], ebp
mov dword [esp + 0xa8], ebp
mov dword [esp + 0xac], ebp
mov dword [esp + 0xb0], ebp
mov dword [esp + 0x40], ebp
call fcn.00406db0
mov eax, dword [esp + 0x2c]
cmp eax, 1
jle 0x40bae5
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x14], 1
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
mov eax, dword [edi + esi*4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
je 0x40b87e
mov ecx, dword [edi + esi*4]
lea edx, [esp + 0x4c8]
push ecx
push edx
call fcn.0040e29f
lea eax, [esp + 0x4d0]
push 0x5c
push eax
call fcn.0040e235
add esp, 0x10
test eax, eax
je 0x40b267
lea ecx, [esp + 0x4c8]
push 0x5c
push ecx
call fcn.0040e235
mov word [eax + 2], bp
jmp 0x40b279
lea edx, [esp + 0x4c8]
push 0x42b7d0
push edx
call fcn.0040e29f
mov al, byte [esp + 0x1b]
add esp, 8
mov byte [esp + 0x18], al
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov eax, dword [0x423e70]
push 0x426ab4
mov esi, dword [ecx + edx*4]
inc eax
mov ecx, eax
mov byte [esp + 0x2bec], 1
shl ecx, 6
add ecx, eax
mov dword [0x423e70], eax
mov dword [eax*4 + 0x42b7c8], ebp
lea edx, [ecx*8 + 0x42a358]
push edx
call fcn.0040e29f
mov eax, dword [0x423e70]
push esi
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [ecx*8 + 0x42b3b0]
push edx
call fcn.0040e29f
mov ecx, dword [0x423e70]
mov eax, ecx
shl eax, 6
add eax, ecx
shl eax, 3
lea ecx, [eax + 0x42b3b0]
lea edx, [eax + 0x42af98]
push ecx
push edx
call fcn.0040e29f
mov ecx, dword [0x423e70]
mov eax, ecx
shl eax, 6
add eax, ecx
shl eax, 3
lea esi, [eax + 0x42af98]
lea edi, [eax + 0x42a358]
push esi
call fcn.0040e218
add esp, 0x1c
cmp word [esi + eax*2 - 2], 0x5c
je 0x40b346
push 0x423ed0
push esi
call fcn.0040e275
add esp, 8
push edi
push esi
call fcn.0040e275
mov eax, dword [0x423e70]
add esp, 8
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
mov ecx, eax
shl edx, 4
shl ecx, 6
add edx, 0x429e88
add ecx, eax
push edx
lea edx, [ecx*8 + 0x42af98]
push edx
call ebx
mov ecx, dword [0x423e70]
mov esi, ecx
mov edx, dword [ecx*4 + 0x42b7c8]
shl esi, 6
add esi, ecx
cmp eax, 0xffffffff
lea esi, [edx + esi*4]
mov dword [esi*4 + 0x42a768], eax
jne 0x40b3a3
dec edx
mov dword [ecx*4 + 0x42b7c8], edx
jmp 0x40b3aa
mov byte [ecx + 0x42b7c4], 0
cmp dword [ecx*4 + 0x42b7c8], ebp
jl 0x40b587
mov al, byte [ecx + 0x42b7c4]
test al, al
jne 0x40b52e
lea eax, [ecx + ecx*8]
lea eax, [ecx + eax*4]
shl eax, 4
test byte [eax + 0x429e88], 0x10
je 0x40b644
lea ecx, [eax + 0x429eb4]
push 0x423edc
push ecx
call fcn.0040ede8
add esp, 8
test eax, eax
je 0x40b528
mov eax, dword [0x423e70]
push 0x423ed4
lea edx, [eax + eax*8]
lea eax, [eax + edx*4]
shl eax, 4
add eax, 0x429eb4
push eax
call fcn.0040ede8
add esp, 8
test eax, eax
je 0x40b528
mov eax, dword [0x423e70]
mov edx, eax
mov esi, dword [eax*4 + 0x42b7c8]
lea ecx, [eax + eax*8]
shl edx, 6
inc esi
add edx, eax
mov dword [eax*4 + 0x42b7c8], esi
lea esi, [eax + ecx*4]
lea edi, [edx*8 + 0x42b3b0]
shl esi, 4
push edi
add esi, 0x429eb4
call fcn.0040e218
add esp, 4
cmp word [edi + eax*2 - 2], 0x5c
je 0x40b470
push 0x423ed0
push edi
call fcn.0040e275
add esp, 8
push esi
push edi
call fcn.0040e275
mov ecx, dword [0x423e70]
mov eax, ecx
shl eax, 6
add eax, ecx
shl eax, 3
lea ecx, [eax + 0x42b3b0]
lea edx, [eax + 0x42af98]
push ecx
push edx
call fcn.0040e29f
mov ecx, dword [0x423e70]
mov eax, ecx
shl eax, 6
add eax, ecx
shl eax, 3
lea ecx, [eax + 0x42a358]
lea edx, [eax + 0x42af98]
push ecx
push edx
call fcn.0040bb90
mov eax, dword [0x423e70]
add esp, 0x18
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
mov ecx, eax
shl edx, 4
shl ecx, 6
add edx, 0x429e88
add ecx, eax
push edx
lea edx, [ecx*8 + 0x42af98]
push edx
call ebx
mov ecx, dword [0x423e70]
mov esi, ecx
mov edx, dword [ecx*4 + 0x42b7c8]
shl esi, 6
add esi, ecx
cmp eax, 0xffffffff
lea esi, [edx + esi*4]
mov dword [esi*4 + 0x42a768], eax
jne 0x40b57a
mov eax, ecx
dec edx
shl eax, 6
add eax, ecx
mov dword [ecx*4 + 0x42b7c8], edx
lea ecx, [eax*8 + 0x42b3b0]
push ecx
call fcn.00407100
add esp, 4
mov ecx, dword [0x423e70]
lea edx, [ecx + ecx*8]
lea eax, [ecx + edx*4]
mov edx, ecx
shl eax, 4
add eax, 0x429e88
shl edx, 6
push eax
mov eax, dword [ecx*4 + 0x42b7c8]
add edx, ecx
lea ecx, [eax + edx*4]
mov edx, dword [ecx*4 + 0x42a768]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov ecx, dword [0x423e70]
test eax, eax
jne 0x40b573
cmp dword [ecx*4 + 0x42b7c8], ebp
jge 0x40b699
mov byte [ecx + 0x42b7c4], 0
cmp dword [ecx*4 + 0x42b7c8], ebp
jge 0x40b3b7
dec ecx
xor al, al
mov dword [0x423e70], ecx
movsx eax, al
cmp eax, 1
mov dword [esp + 0x2c], eax
jne 0x40b72d
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x84]
mov byte [esp + 0x84], al
call fcn.0040c030
lea ecx, [esp + 0xb8]
push ecx
call fcn.0040e218
add esp, 4
mov esi, eax
lea ecx, [esp + 0x80]
push 1
push esi
call fcn.0040c690
test al, al
je 0x40b603
mov eax, dword [esp + 0x84]
lea edx, [esp + 0xb8]
push esi
push edx
push eax
call fcn.0040bb60
add esp, 0xc
lea ecx, [esp + 0x80]
push esi
call fcn.0040c670
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x80]
push ecx
push 1
push edx
lea ecx, [esp + 0x24]
mov byte [esp + 0x2bf4], 2
call fcn.0040c2a0
push 1
lea ecx, [esp + 0x84]
mov byte [esp + 0x2bec], 1
call fcn.0040c030
mov ecx, dword [0x423e70]
jmp 0x40b3aa
mov eax, ecx
lea edx, [esp + 0xb8]
shl eax, 6
add eax, ecx
lea ecx, [eax*8 + 0x42b3b0]
push ecx
push edx
call fcn.0040e29f
mov eax, dword [0x423e70]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*4]
lea eax, [esp + 0xc0]
shl edx, 4
add edx, 0x429eb4
push edx
push eax
call fcn.0040bb90
mov ecx, dword [0x423e70]
add esp, 0x10
mov al, 1
mov byte [ecx + 0x42b7c4], 1
jmp 0x40b590
mov eax, dword [ecx*4 + 0x42b7c8]
mov edx, ecx
shl edx, 6
add edx, ecx
lea ecx, [eax + edx*4]
mov edx, dword [ecx*4 + 0x42a768]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [0x423e70]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea eax, [esp + 0xb8]
lea edx, [ecx*8 + 0x42b3b0]
push edx
push eax
call fcn.0040e29f
mov eax, dword [0x423e70]
mov ecx, eax
mov esi, dword [eax*4 + 0x42b7c8]
shl ecx, 6
add ecx, eax
dec esi
mov dword [eax*4 + 0x42b7c8], esi
lea edx, [ecx*8 + 0x42b3b0]
push edx
call fcn.00407100
mov ecx, dword [0x423e70]
add esp, 0xc
cmp dword [ecx*4 + 0x42b7c8], ebp
jge 0x40b71f
mov byte [ecx + 0x42b7c4], 0
jmp 0x40b587
mov byte [ecx + 0x42b7c4], 2
mov al, 2
jmp 0x40b590
mov edx, dword [esp + 0x1c]
cmp edx, ebp
je 0x40b833
mov edi, dword [esp + 0x20]
sub edi, edx
sar edi, 4
je 0x40b833
inc edi
lea eax, [edi*4]
push eax
call fcn.0040e20a
mov esi, 1
add esp, 4
cmp edi, esi
mov ebp, eax
jle 0x40b79d
mov ebx, 0x10
push 0x208
call fcn.0040e20a
mov dword [ebp + esi*4], eax
mov ecx, dword [esp + 0x20]
add esp, 4
mov ecx, dword [ecx + ebx - 0xc]
test ecx, ecx
jne 0x40b78b
mov ecx, 0x41c53c
push ecx
push eax
call fcn.0040e29f
add esp, 8
inc esi
add ebx, 0x10
cmp esi, edi
jl 0x40b769
lea edx, [esp + 0x4c8]
lea eax, [esp + 0xbe0]
push edx
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x98]
push ecx
lea eax, [esp + 0x74]
push edx
lea ecx, [esp + 0x58]
push eax
lea edx, [esp + 0x64]
push ecx
lea eax, [esp + 0x64]
push edx
push eax
push ebp
push edi
call fcn.00407800
mov esi, 1
add esp, 0x28
cmp edi, esi
jle 0x40b7f3
mov eax, dword [ebp + esi*4]
push eax
call fcn.0040e1ff
add esp, 4
inc esi
cmp esi, edi
jl 0x40b7e1
push ebp
call fcn.0040e1ff
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
push ecx
push eax
push eax
call fcn.0040c8d0
mov edx, dword [esp + 0x30]
add esp, 0x10
mov esi, eax
lea ecx, [esp + 0x18]
push edx
push esi
call fcn.0040bfe0
mov ecx, dword [0x423e70]
mov eax, dword [esp + 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x20], esi
xor ebp, ebp
cmp eax, ebp
jne 0x40b3aa
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov eax, edi
mov byte [esp + 0x2be8], 0
cmp esi, eax
je 0x40b860
push ebp
mov ecx, esi
call fcn.0040cc00
add esi, 0x10
cmp esi, edi
jne 0x40b851
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040e1ff
add esp, 4
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
jmp 0x40bacf
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov al, byte [esp + 0x13]
push ebp
mov edi, dword [ecx + edx*4]
lea ecx, [esp + 0x74]
mov byte [esp + 0x74], al
call fcn.0040c030
push edi
call fcn.0040e218
add esp, 4
mov esi, eax
lea ecx, [esp + 0x70]
push 1
push esi
call fcn.0040c690
test al, al
je 0x40b8cf
mov ecx, dword [esp + 0x74]
push esi
push edi
push ecx
call fcn.0040bb60
add esp, 0xc
lea ecx, [esp + 0x70]
push esi
call fcn.0040c670
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x70]
push edx
push 1
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x2bf4], 3
call fcn.0040c2a0
push 1
lea ecx, [esp + 0x74]
mov byte [esp + 0x2bec], 0
call fcn.0040c030
mov ecx, dword [esp + 0x30]
xor ebp, ebp
lea edx, [ecx - 1]
mov ecx, dword [esp + 0x14]
cmp ecx, edx
jne 0x40bacf
mov eax, dword [esp + 0x38]
cmp eax, ebp
je 0x40bacf
mov edx, dword [esp + 0x3c]
sub edx, eax
sar edx, 4
mov dword [esp + 0x2c], edx
je 0x40bacf
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x2c0]
mov ecx, dword [eax + ecx*4]
push ecx
push edx
call fcn.0040e29f
lea eax, [esp + 0x2c8]
push 0x5c
push eax
call fcn.0040e235
add esp, 0x10
test eax, eax
je 0x40b973
lea ecx, [esp + 0x2c0]
push 0x5c
push ecx
call fcn.0040e235
mov word [eax + 2], bp
jmp 0x40b985
lea edx, [esp + 0x2c0]
push 0x42b7d0
push edx
call fcn.0040e29f
mov eax, dword [esp + 0x40]
add esp, 8
cmp eax, ebp
jne 0x40b994
xor edi, edi
jmp 0x40b99d
mov edi, dword [esp + 0x3c]
sub edi, eax
sar edi, 4
inc edi
lea eax, [edi*4]
push eax
call fcn.0040e20a
mov esi, 1
add esp, 4
cmp edi, esi
mov ebx, eax
jle 0x40b9f1
mov ebp, 0x10
push 0x208
call fcn.0040e20a
mov dword [ebx + esi*4], eax
mov ecx, dword [esp + 0x3c]
add esp, 4
mov ecx, dword [ecx + ebp - 0xc]
test ecx, ecx
jne 0x40b9df
mov ecx, 0x41c53c
push ecx
push eax
call fcn.0040e29f
add esp, 8
inc esi
add ebp, 0x10
cmp esi, edi
jl 0x40b9be
lea edx, [esp + 0x2c0]
lea eax, [esp + 0xbe0]
push edx
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x98]
push ecx
lea eax, [esp + 0x74]
push edx
lea ecx, [esp + 0x58]
push eax
lea edx, [esp + 0x64]
push ecx
lea eax, [esp + 0x64]
push edx
push eax
push ebx
push edi
call fcn.00407800
mov esi, 1
add esp, 0x28
cmp edi, esi
jle 0x40ba46
mov eax, dword [ebx + esi*4]
push eax
call fcn.0040e1ff
add esp, 4
inc esi
cmp esi, edi
jl 0x40ba35
push ebx
call fcn.0040e1ff
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add esp, 4
cmp esi, eax
mov dword [esp + 0x2c], esi
mov ebp, eax
je 0x40babf
add esi, 4
xor ebx, ebx
mov eax, dword [esi]
cmp eax, ebx
je 0x40baad
lea edi, [esi - 4]
push eax
mov ecx, edi
call fcn.0040c540
cmp byte [eax], 0
je 0x40ba99
mov ecx, dword [esi]
push ecx
mov ecx, edi
call fcn.0040c540
cmp byte [eax], 0xff
je 0x40ba99
mov edx, dword [esi]
mov ecx, edi
push edx
call fcn.0040c540
dec byte [eax]
jmp 0x40baad
mov eax, dword [esi + 8]
mov ecx, dword [esi]
add eax, 2
sub ecx, 2
push eax
push ecx
mov ecx, edi
call fcn.0040c550
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
add esi, 0x10
lea edx, [esi - 4]
cmp edx, ebp
jne 0x40ba66
mov eax, dword [esp + 0x2c]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x3c], eax
xor ebp, ebp
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
inc ecx
cmp ecx, eax
mov dword [esp + 0x14], ecx
jl 0x40b211
pop ebx
dec eax
lea ecx, [esp + 0x8d4]
push eax
push str.__qQ_
push ecx
call fcn.0040e67a
add esp, 0xc
lea edx, [esp + 0x8d4]
push ebp
push 0x426a8c
push edx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
cmp esi, edi
mov dword [esp + 0x2be4], 0xffffffff
je 0x40bb3c
push 1
mov ecx, esi
call fcn.0040c030
add esi, 0x10
cmp esi, edi
jne 0x40bb28
mov esi, dword [esp + 0x34]
push esi
call fcn.0040e1ff
add esp, 4
pop esi
mov ecx, dword [esp + 0x2bd8]
pop edi
xor eax, eax
pop ebp
mov dword fs:[0], ecx
add esp, 0x2bdc
ret