Function at 0x4023d0
Capabilities:
Create directory
Get common file path
Get file size
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa54
mov eax, dword [0x41c050]
xor eax, esp
mov dword [esp + 0xa50], eax
push ebx
push esi
lea eax, [esp + 0x18]
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
test eax, eax
je 0x40242a
push 0x419498
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40241f
lea ecx, [esp + 0x1c]
push ecx
call eax
jmp 0x40242a
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ax, word [esp + 0x1c]
cmp ax, 9
je 0x40243b
cmp ax, 6
jne 0x402442
mov eax, 1
jmp 0x402444
xor eax, eax
mov dword [esi + 0x17c], eax
mov ebx, dword [esi + 0x174]
add esi, 0x164
cmp dword [esi + 0xc], ebx
jbe 0x402460
call fcn.00409f0d
mov edi, dword [esi + 0xc]
mov eax, dword [esi]
mov dword [esp + 0x14], eax
cmp edi, dword [esi + 0x10]
jbe 0x402473
call fcn.00409f0d
mov ecx, dword [esp + 0x14]
mov eax, dword [esi]
push ebx
push ecx
push edi
push eax
lea ebx, [esp + 0x24]
call fcn.00403a20
push 0x104
lea edx, [esp + 0x4c]
push 0
push edx
call fcn.0040a7f0
push 0x104
lea eax, [esp + 0x260]
push 0
push eax
call fcn.0040a7f0
add esp, 0x18
push 0x104
lea ecx, [esp + 0x4c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x48]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4024c7
mov edi, dword [esp + 0x10]
sub eax, edx
sar eax, 1
push eax
lea esi, [edi + 0x180]
lea eax, [esp + 0x4c]
call fcn.004015f0
lea edx, [esp + 0x250]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x250]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402507
sub eax, edx
sar eax, 1
lea ebx, [edi + 0x120]
push eax
lea eax, [esp + 0x254]
mov esi, ebx
call fcn.004015f0
lea eax, [esp + 0x658]
push eax
lea ecx, [esp + 0x45c]
push ecx
lea edx, [esp + 0x860]
push edx
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x58]
push ecx
call fcn.00409d38
lea eax, [esp + 0x46c]
add esp, 0x14
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402560
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x45c]
mov ecx, ebx
call fcn.00401510
push 1
mov eax, 0x4196d8
mov ecx, ebx
call fcn.00401510
cmp dword [ebx + 0x18], 8
jb 0x402597
mov eax, dword [ebx + 4]
jmp 0x40259a
lea eax, [ebx + 4]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
test eax, eax
je 0x4025c9
cmp eax, 0xffffffff
jne 0x4025d2
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [edi + 0x158], eax
test eax, eax
je 0x402687
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x15c], eax
push edi
mov edi, dword [edi + 0x158]
call fcn.004029c0
mov esi, dword [esp + 0x10]
cmp eax, dword [esi + 0x15c]
mov dword [esi + 0x160], eax
jl 0x40262f
mov eax, dword [esi + 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa50]
xor ecx, esp
call fcn.0040913f
mov esp, ebp
pop ebp
ret
push eax
call fcn.00402960
mov ecx, dword [esi + 0x160]
add ecx, 0x100
push ecx
mov edx, 0x4196dc
mov ecx, esi
call fcn.00402a60
cmp dword [esi + 0x17c], 0
je 0x402667
mov edx, dword [esi + 0x10]
push edx
mov edx, 0x4196e4
mov ecx, esi
call fcn.00402a60
mov eax, dword [esi + 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx + 0x18], 8
jb 0x40267f
mov esi, dword [ebx + 4]
jmp 0x402682
lea esi, [ebx + 4]
call fcn.00403310
mov ecx, dword [esp + 0xa5c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040913f
mov esp, ebp
pop ebp
ret