Function at 0x4416d0
Capabilities:
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18c
mov edx, dword [ebp + 8]
test edx, edx
je 0x4419e0
mov dword [esp], 0x446810
lea eax, [ebp - 0x158]
mov dword [esp + 4], eax
call sub.KERNEL32.dll_FindFirstFileA
mov dword [ebp - 0x160], eax
sub esp, 8
inc eax
je 0x441a28
mov eax, dword [ebp - 0x160]
xor edi, edi
mov esi, 0x40000000
mov dword [esp], eax
call sub.KERNEL32.dll_FindClose
sub esp, 4
mov eax, 0x4463d0
mov dword [esp + 4], eax
mov dword [esp], 0x208
call sub.KERNEL32.dll_GetCurrentDirectoryA
sub esp, 8
mov dword [esp], 0x446810
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, pe_nt_image_headers32
mov dword [esp + 0x14], eax
mov eax, 2
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x160], eax
sub esp, 0x1c
inc eax
je 0x441a53
mov ebx, 1
mov dword [esp + 4], ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
lea eax, [eax + eax*2]
cmp eax, 0x10
jb 0x4419e8
mov dword [esp], eax
mov edi, 1
call fcn.00403a80
mov dword [ebp - 0x164], eax
mov eax, dword [ebp + 8]
mov esi, dword [eax + 4]
jmp 0x44182f
mov eax, dword [ebp - 0x168]
xor ebx, ebx
test eax, eax
jne 0x4418c0
mov eax, dword [esi + 4]
mov edx, dword [ebp - 0x164]
call fcn.004408b0
xor ecx, ecx
test ebx, ebx
mov dword [ebp - 0x16c], ecx
jne 0x441920
mov eax, dword [ebp - 0x16c]
xor ebx, ebx
test eax, eax
jne 0x441980
test ebx, ebx
mov edi, ebx
je 0x4419ca
mov eax, dword [esi]
mov ebx, dword [esi + 8]
mov dword [esp], eax
call fcn.00403f40
mov eax, dword [esi + 4]
mov dword [esp], eax
call fcn.00403f40
mov dword [esp], esi
mov esi, ebx
call fcn.00403f40
test esi, esi
je 0x4419f2
mov edx, dword [ebp - 0x164]
mov eax, dword [esi]
call fcn.004408b0
xor ecx, ecx
test edi, edi
mov dword [ebp - 0x168], ecx
je 0x4417c5
mov edx, dword [ebp - 0x164]
mov dword [esp], edx
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
xor edx, edx
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x15c]
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x164]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x160]
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x4417c5
mov eax, 1
xor ebx, ebx
mov dword [ebp - 0x168], eax
mov eax, dword [ebp - 0x168]
test eax, eax
je 0x4417d5
lea esi, [esi]
lea edi, [edi]
xor eax, eax
mov edi, 0x456568
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov edx, dword [ebp - 0x160]
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x4417d5
mov eax, dword [esi + 4]
mov ebx, 1
mov edx, dword [ebp - 0x164]
call fcn.004408b0
xor ecx, ecx
test ebx, ebx
mov dword [ebp - 0x16c], ecx
je 0x4417f3
nop
mov eax, dword [ebp - 0x164]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [esp + 8], eax
xor edx, edx
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x15c]
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x164]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x160]
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x4417f3
mov eax, 1
xor ebx, ebx
mov dword [ebp - 0x16c], eax
mov eax, dword [ebp - 0x16c]
test eax, eax
je 0x441803
xor eax, eax
mov edi, 0x45656a
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x15c]
mov dword [esp + 0xc], eax
mov eax, 2
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov edx, dword [ebp - 0x160]
mov dword [esp], edx
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
test eax, eax
je 0x441803
mov ebx, 1
test ebx, ebx
mov edi, ebx
jne 0x44180d
mov eax, dword [esi]
mov dword [esp], 0x45656d
mov dword [esp + 4], eax
call fcn.00440770
lea esi, [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x10
jmp 0x4417aa
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [esp], eax
call fcn.00403f40
mov eax, dword [ebp - 0x160]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov dword [esp], 0x4463d0
call sub.KERNEL32.dll_SetCurrentDirectoryA
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x446810
call fcn.00440a60
test eax, eax
jne 0x44170d
mov dword [esp], 0x45657a
mov eax, 0x446810
mov dword [esp + 4], eax
call fcn.00440770
jmp 0x4419e0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [esp], 0x456595
mov dword [esp + 4], eax
call fcn.00440770
jmp 0x4419e0