Function at 0x403e40
Capabilities:
Create directory
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x41520b
mov eax, dword fs:[0]
push eax
mov eax, 0x42d0
call fcn.00412b00
mov eax, dword [0x41ab9c]
xor eax, esp
mov dword [esp + 0x42c8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41ab9c]
xor eax, esp
push eax
lea eax, [esp + 0x42e4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x42f4]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
push eax
mov dword [esp + 0x58], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x60], eax
cmp eax, 0xffffffff
jne 0x403ebd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
je 0x403ebd
xor eax, eax
jmp 0x4042d1
lea edx, [esp + 0x58]
mov dword [esp + 0x58], 0x404490
mov dword [esp + 0x5c], 0x4044c0
mov dword [esp + 0xb4], 0x404560
mov dword [esp + 0xb8], 0x4045c0
mov dword [esp + 0xbc], 0x4045d0
mov dword [esp + 0xc0], 0x404630
mov dword [esp + 0xc4], edx
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xc8], ebx
mov dword [esp + 0x30], 0x404650
mov dword [esp + 0x34], 0x406fd0
mov dword [esp + 0x44], 0x404650
mov dword [esp + 0x48], 0x406fd0
xor ebp, ebp
mov dword [esp + 0x40], ebx
call fcn.00404670
lea eax, [esp + 0xb4]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x4c]
lea ecx, [esp + 0x38]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa0], ebx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xa8], ebx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebx
call fcn.00406990
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x403fc7
lea edi, [esp + 0x30]
lea eax, [esp + 0x64]
call fcn.00404950
mov dword [esp + 0x18], esi
cmp esi, ebx
jne 0x404298
xor eax, eax
mov dword [esp + 0x4c], 0xffffffff
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x24], ebx
cmp dword [esp + 0x80], eax
jbe 0x404285
mov edx, dword [esp + 0x74]
mov dword [esp + 0x1c], edx
mov edi, edi
mov edi, dword [esp + 0xa4]
mov esi, dword [edi + ebx*4 + 4]
sub esi, dword [edi + ebx*4]
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], eax
cmp esi, dword [esp + 0x40]
jbe 0x404047
push ebp
call fcn.0040a8fa
lea eax, [esi + esi]
add esp, 4
mov dword [esp + 0x40], esi
test eax, eax
je 0x404271
push eax
call fcn.0040a830
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x404273
mov eax, dword [edi + ebx*4]
mov ecx, dword [edi + ebx*4 + 4]
sub ecx, eax
test ebp, ebp
je 0x404075
mov edx, dword [esp + 0xa8]
lea edx, [edx + eax*2]
test ecx, ecx
jbe 0x404075
mov eax, ebp
sub edx, ebp
mov si, word [edx + eax]
mov word [eax], si
add eax, 2
sub ecx, 1
jne 0x404066
cmp dword [esp + 0x18], 0
jne 0x404285
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x19], 0
jne 0x4040d1
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0xd0]
push ebx
push edx
lea eax, [esp + 0x88]
call fcn.00406db0
add esp, 0x24
mov dword [esp + 0x18], eax
test eax, eax
jne 0x404285
xor ebx, ebx
cmp word [ebp], bx
je 0x404175
mov esi, ebp
nop
cmp word [esi], 0x2f
jne 0x404164
xor eax, eax
mov word [esi], ax
mov edx, dword [0x41b0a4]
mov eax, dword [edx + 0xc]
mov ecx, 0x41b0a4
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x3c]
push ebp
push ecx
push str._s_s
lea edi, [esp + 0x2c]
mov dword [esp + 0x42f8], 0
call fcn.00401750
mov edi, dword [esp + 0x2c]
add esp, 0xc
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, 0x5c
lea eax, [edi - 0x10]
mov word [esi], dx
mov dword [esp + 0x42ec], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404164
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc ebx
cmp word [ebp + ebx*2], 0
lea esi, [ebp + ebx*2]
jne 0x4040e0
mov ecx, dword [esp + 0x3c]
push ebp
push ecx
lea edx, [esp + 0x40dc]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esp + 0x2c]
add esp, 0x10
cmp byte [eax + 0x19], 0
push 0
je 0x4041b0
lea ecx, [esp + 0x40d8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x404251
push 0x80
push 2
push 0
push 1
push 0x40000000
lea edx, [esp + 0x40ec]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x50], esi
cmp esi, 0xffffffff
jne 0x4041e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40427d
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x20], eax
lea eax, [ecx + edx]
lea ecx, [esp + 0x50]
push ecx
lea edi, [esp + 0x24]
call fcn.00404380
add esp, 4
test eax, eax
jne 0x40427d
mov edx, dword [esp + 0x28]
cmp dword [esp + 0x20], edx
jne 0x40427d
cmp esi, 0xffffffff
je 0x404233
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x404233
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40427d
mov eax, dword [esp + 0x1c]
cmp byte [eax + 0x1d], 0
je 0x404251
mov ecx, eax
mov edx, dword [ecx + 0x14]
push edx
lea eax, [esp + 0x40d8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x24]
add dword [esp + 0x1c], 0x20
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x80]
jae 0x404285
mov ebx, eax
xor eax, eax
jmp 0x404000
xor ebp, ebp
mov dword [esp + 0x18], 2
jmp 0x404285
mov dword [esp + 0x18], 0xb
mov ecx, dword [esp + 0x2c]
push ecx
lea edx, [esp + 0x34]
push edx
call dword [esp + 0x3c]
add esp, 8
xor ebx, ebx
lea edi, [esp + 0x30]
lea eax, [esp + 0x64]
call fcn.00404950
push ebp
call fcn.0040a8fa
mov eax, dword [esp + 0x64]
add esp, 4
cmp eax, 0xffffffff
je 0x4042c8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4042c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
cmp dword [esp + 0x18], ebx
sete al
mov ecx, dword [esp + 0x42e4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x42c8]
xor ecx, esp
call fcn.0040ae4b
add esp, 0x42dc
ret