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

Disassembly:
mov eax, 0x1078
call fcn.005fc5a0
mov eax, dword [esp + 0x107c]
push ebx
push esi
xor ebx, ebx
push edi
push ebx
push ebx
push 4
push ebx
push 1
xor edi, edi
push 0xc0000000
push eax
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x44], edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x24], esi
je 0x477f38
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x14]
push 2
push ecx
push ebx
push esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call ebp
cmp eax, 0xffffffff
jne 0x477b2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
lea edx, [esp + 0x54]
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x58]
mov dword [esp + 0x54], ebx
push edx
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x477ee7
cmp dword [esp + 0x74], ebx
jne 0x477b64
cmp dword [esp + 0x78], 0xa308
jb 0x477ee7
lea eax, [esp + 0x14]
push 2
push eax
push 0xfffffffffffffffc
push esi
mov dword [esp + 0x20], 0xfffffffc
mov dword [esp + 0x24], 0xffffffff
call ebp
cmp eax, 0xffffffff
jne 0x477b93
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x18]
push ebx
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
push esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x2c], ebx
call edi
test eax, eax
je 0x477ee7
cmp dword [esp + 0x18], 4
jne 0x477f0b
cmp dword [esp + 0x24], 3
jne 0x477f1a
lea eax, [esp + 0x14]
push 2
push eax
push 0xfffffffffffffff4
push esi
mov dword [esp + 0x20], 0xfffffff4
mov dword [esp + 0x24], 0xffffffff
call ebp
cmp eax, 0xffffffff
jne 0x477bfe
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
lea ecx, [esp + 0x18]
push ebx
push ecx
lea edx, [esp + 0x2c]
push 4
push edx
push esi
call edi
test eax, eax
je 0x477ee7
cmp dword [esp + 0x18], 4
jne 0x477f29
cmp dword [esp + 0x24], 2
jne 0x477f0b
lea eax, [esp + 0x14]
push 2
push eax
push 0xfffffffffffffff0
push esi
mov dword [esp + 0x44], ebx
mov dword [esp + 0x20], 0xfffffff0
mov dword [esp + 0x24], 0xffffffff
call ebp
cmp eax, 0xffffffff
jne 0x477c5f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
lea ecx, [esp + 0x18]
push ebx
push ecx
lea edx, [esp + 0x3c]
push 4
push edx
push esi
call edi
test eax, eax
je 0x477ee7
cmp dword [esp + 0x34], 0xa2f0
jne 0x477f1a
lea eax, [esp + 0x14]
push 1
push eax
push 0xffff5d00
push esi
mov dword [esp + 0x20], 0xffff5d00
mov dword [esp + 0x24], 0xffffffff
call ebp
cmp eax, 0xffffffff
jne 0x477cb7
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
lea ecx, [esp + 0x20]
push ebx
mov ebp, 4
push ecx
lea edx, [esp + 0x44]
push ebp
push edx
push esi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x4c], ebx
call edi
test eax, eax
je 0x477ee7
cmp dword [esp + 0x20], ebp
jne 0x477ee7
lea eax, [esp + 0x20]
push ebx
push eax
lea ecx, [esp + 0x40]
push ebp
push ecx
push esi
call edi
test eax, eax
je 0x477ee7
cmp dword [esp + 0x20], ebp
jne 0x477ee7
mov edx, dword [esp + 0x38]
push 1
push ebx
push ebx
push edx
call fcn.005fd650
mov ecx, dword [esp + 0x3c]
mov ebp, edx
xor edx, edx
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x74]
push 1
push ebx
push ebx
push eax
adc ebp, edx
call fcn.005fd650
mov ecx, dword [esp + 0x78]
xor edi, edi
add eax, ecx
adc edx, edi
cmp ebp, edx
ja 0x477f29
jb 0x477d54
cmp dword [esp + 0x40], eax
ja 0x477f29
mov edx, dword [esp + 0x1090]
push ebx
push ebx
push 4
push ebx
push 1
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x477ee7
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x14]
push ebx
push eax
push ebx
push esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call edi
cmp eax, 0xffffffff
jne 0x477da6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ebx
push ecx
push ebx
push edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call edi
cmp eax, 0xffffffff
jne 0x477dcf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477ee7
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x89]
mov byte [esp + 0x88], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edx, edx
xor esi, esi
cmp ebp, edx
mov dword [esp + 0x48], edx
stosb byte es:[edi], al
jb 0x477ece
ja 0x477e06
cmp dword [esp + 0x40], edx
jbe 0x477ece
mov edi, dword [esp + 0x1094]
jmp 0x477e11
xor edx, edx
mov eax, dword [esp + 0x40]
mov ecx, ebp
sub eax, ebx
sbb ecx, esi
jne 0x477e24
cmp eax, 0x1000
jbe 0x477e2f
mov eax, 0x1000
mov dword [esp + 0x50], edx
jmp 0x477e33
mov dword [esp + 0x50], ecx
lea ecx, [esp + 0x30]
push edx
mov dword [esp + 0x34], edx
push ecx
push eax
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x94]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x477ee3
mov eax, dword [esp + 0x30]
test eax, eax
je 0x477ece
lea ecx, [esp + 0x48]
push 0
push ecx
push eax
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x94]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x477ee3
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
cmp ecx, eax
jne 0x477ee3
mov edi, dword [edi]
add ebx, eax
adc esi, 0
push 0
push 0x64
push esi
push ebx
call fcn.005fd650
mov ecx, dword [esp + 0x40]
push ebp
push ecx
push edx
push eax
call fcn.005fd690
mov edx, edi
mov edi, dword [esp + 0x1094]
push eax
mov ecx, edi
call dword [edx + 0x10]
cmp esi, ebp
jb 0x477e0f
ja 0x477ece
cmp ebx, dword [esp + 0x40]
jb 0x477e0f
mov eax, dword [esp + 0x1098]
mov dword [esp + 0x2c], 1
mov dword [eax], 1
mov esi, dword [esp + 0x28]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [esp + 0x1c]
pop ebp
cmp eax, 0xffffffff
je 0x477efd
push eax
call esi
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebx
add esp, 0x1078
ret
mov ecx, dword [esp + 0x1098]
mov dword [ecx], 5
jmp 0x477ee7
mov edx, dword [esp + 0x1098]
mov dword [edx], 5
jmp 0x477ee7
mov eax, dword [esp + 0x1098]
mov dword [eax], 5
jmp 0x477ee7
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x1078
ret