Function at 0x407ae0
Capabilities:
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4f23fc
mov eax, dword fs:[0]
push eax
sub esp, 0x3b8
mov eax, dword [0x52b360]
xor eax, esp
mov dword [esp + 0x3b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x52b360]
xor eax, esp
push eax
lea eax, [esp + 0x3cc]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3dc]
xor ebp, ebp
push ebp
push 0x80
push 2
push ebp
push 1
push 0xc0000000
mov esi, ecx
push eax
mov dword [esp + 0x84], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, 0xffffffff
jne 0x407b56
xor al, al
jmp 0x4080ff
lea eax, [esp + 0x3c]
push eax
call fcn.00403c40
lea ecx, [esp + 0x3c]
push ecx
push esi
mov dword [esp + 0x3dc], ebp
call fcn.004077c0
mov ecx, dword [esp + 0x54]
sub ecx, dword [esp + 0x50]
xor eax, eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov eax, 0x92492493
imul ecx
add edx, ecx
add esp, 8
sar edx, 4
push ebp
mov eax, edx
lea ecx, [esp + 0x18]
push ecx
shr eax, 0x1f
add eax, edx
push 0x14
lea edx, [esp + 0x60]
push edx
push ebx
mov dword [esp + 0x68], 0x123
mov dword [esp + 0x6c], eax
mov dword [esp + 0x28], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x24]
push eax
call fcn.00403c40
mov byte [esp + 0x3d4], 1
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
mov dword [esp + 0x18], 0x14
je 0x407dba
xor ebx, ebx
mov dword [esp + 0x20], ebx
lea ecx, [ecx]
push 0x214
lea ecx, [esp + 0xa8]
push 0
push ecx
call fcn.004d1df0
add esp, 0xc
cmp ebp, esi
jb 0x407c34
call fcn.004c96d9
mov edi, dword [esp + 0x48]
cmp dword [ebx + edi + 0x18], 8
jb 0x407c41
mov edi, dword [ebx + edi + 4]
jmp 0x407c45
lea edi, [ebx + edi + 4]
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
neg eax
sbb eax, eax
neg eax
mov dword [esp + 0xa4], eax
sub ecx, esi
mov dword [esp + 0xa8], edx
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0xac], 0
cmp ebp, eax
jb 0x407c99
call fcn.004c96d9
mov esi, dword [esp + 0x48]
mov edi, 8
cmp dword [ebx + esi + 0x18], edi
jb 0x407caa
mov esi, dword [ebx + esi + 4]
jmp 0x407cae
lea esi, [ebx + esi + 4]
push esi
lea ecx, [esp + 0xb4]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
cmp dword [esp + 0xa4], 0
jne 0x407d77
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jb 0x407cf5
call fcn.004c96d9
mov esi, dword [esp + 0x48]
cmp dword [ebx + esi + 0x18], edi
jb 0x407d01
mov esi, dword [ebx + esi + 4]
jmp 0x407d05
lea esi, [ebx + esi + 4]
push 0x4fea44
push esi
call fcn.004c97af
mov edi, eax
add esp, 8
test edi, edi
je 0x407d77
xor ebx, ebx
jmp 0x407d20
push edi
push 0x104
lea ecx, [esp + 0x2c4]
push 1
push ecx
call fcn.004c9ab9
mov esi, eax
add esp, 0x10
test esi, esi
jle 0x407d5d
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x18]
push edx
push esi
lea eax, [esp + 0x2c8]
push eax
push ecx
add ebx, esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
jne 0x407d20
add dword [esp + 0x18], ebx
push edi
mov dword [esp + 0xb0], ebx
call fcn.004c9c66
mov ebx, dword [esp + 0x24]
add esp, 4
lea edx, [esp + 0xa4]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.004083e0
mov ecx, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
inc ebp
add ebx, 0x1c
add esi, edx
mov dword [esp + 0x20], ebx
cmp ebp, esi
jb 0x407c10
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x68]
lea ecx, [ebp - 0x14]
push esi
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 - 2], 0x5c
mov dword [esp + 0x1c], eax
je 0x407de5
inc eax
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
xor esi, esi
xor edi, edi
add eax, edx
je 0x40803d
xor ebp, ebp
cmp edi, eax
jb 0x407e15
call fcn.004c96d9
mov eax, dword [esp + 0x30]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x18]
push edx
push 4
lea ecx, [eax + ebp]
push ecx
push ebx
call esi
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x407e52
call fcn.004c96d9
mov edx, dword [esp + 0x30]
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
lea eax, [edx + ebp + 4]
push eax
push ebx
call esi
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp edi, ecx
jb 0x407e8b
call fcn.004c96d9
mov eax, dword [esp + 0x30]
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea ecx, [eax + ebp + 8]
push ecx
push ebx
call esi
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x407ec4
call fcn.004c96d9
mov ecx, dword [esp + 0x30]
lea edx, [ecx + ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
add eax, eax
mov dword [esp + 0x20], eax
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x407f01
call fcn.004c96d9
mov ecx, dword [esp + 0x30]
lea ecx, [ecx + ebp + 0xc]
xor edx, edx
mov eax, ecx
mov dword [esp + 0xa0], 7
mov dword [esp + 0x9c], 0
mov word [esp + 0x8c], dx
lea esi, [eax + 2]
mov edi, edi
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x407f30
sub eax, esi
sar eax, 1
push eax
push ecx
lea esi, [esp + 0x90]
call fcn.00401760
mov edx, dword [esp + 0x1c]
mov eax, esi
push eax
or ecx, 0xffffffff
lea esi, [esp + 0x70]
mov byte [esp + 0x3d8], 2
call fcn.00408160
push 0xffffffffffffffff
push 0
push eax
lea eax, [esp + 0x94]
mov byte [esp + 0x3e0], 3
call fcn.00401850
mov esi, 8
cmp dword [esp + 0x84], esi
jb 0x407f9c
mov ecx, dword [esp + 0x70]
push ecx
call fcn.004c8f17
add esp, 4
push 0
lea edx, [esp + 0x18]
push edx
push 4
lea eax, [esp + 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x8c]
cmp dword [esp + 0xa0], esi
jae 0x407fc8
lea eax, [esp + 0x8c]
mov edx, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
lea edx, [ecx + eax + 0x10]
mov byte [esp + 0x3d4], 1
mov dword [esp + 0x18], edx
cmp dword [esp + 0xa0], esi
jb 0x40800d
mov eax, dword [esp + 0x8c]
push eax
call fcn.004c8f17
add esp, 4
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x30]
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
inc edi
add eax, edx
add ebp, 0x214
xor esi, esi
cmp edi, eax
jb 0x407e15
mov ebp, dword [esp + 0x18]
push esi
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub ebp, dword [esp + 0x60]
push esi
lea ecx, [esp + 0x18]
push ecx
push 0x14
lea edx, [esp + 0x60]
push edx
push ebx
mov dword [esp + 0x78], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x30]
cmp eax, esi
je 0x40807b
push eax
call fcn.004c8f17
add esp, 4
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
call fcn.004c8f17
mov eax, dword [esp + 0x4c]
add esp, 4
cmp eax, esi
je 0x4080e4
mov edi, dword [esp + 0x4c]
cmp eax, edi
je 0x4080db
lea esi, [eax + 0x18]
cmp dword [esi], 8
jb 0x4080b8
mov ecx, dword [esi - 0x14]
push ecx
call fcn.004c8f17
add esp, 4
xor edx, edx
mov dword [esi], 7
mov dword [esi - 4], 0
mov word [esi - 0x14], dx
add esi, 0x1c
lea eax, [esi - 0x18]
cmp eax, edi
jne 0x4080a7
mov eax, dword [esp + 0x48]
xor esi, esi
push eax
call fcn.004c8f17
add esp, 4
mov ecx, dword [esp + 0x3c]
push ecx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
call fcn.004c8f17
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x3cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3b0]
xor ecx, esp
call fcn.004c8f08
add esp, 0x3c4
ret