Function at 0x477810
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x4c
mov eax, dword [esp + 0x54]
push ebp
push esi
xor ebp, ebp
push edi
push ebp
push ebp
push 4
push ebp
push 1
xor edi, edi
push 0xc0000000
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x477aa0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [esp + 0x24]
push 2
push ecx
push ebp
push esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
call ebx
cmp eax, 0xffffffff
jne 0x477875
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477a53
lea edx, [esp + 0x28]
mov ecx, 0xc
xor eax, eax
lea edi, [esp + 0x2c]
mov dword [esp + 0x28], ebp
push edx
rep stosd dword es:[edi], eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x477a53
cmp dword [esp + 0x48], ebp
jne 0x4778ae
cmp dword [esp + 0x4c], 0xa304
jb 0x477a53
lea eax, [esp + 0x24]
push 2
push eax
push 0xfffffffffffffffc
push esi
mov dword [esp + 0x30], 0xfffffffc
mov dword [esp + 0x34], 0xffffffff
call ebx
cmp eax, 0xffffffff
jne 0x4778dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477a53
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x64]
push ebp
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x78], ebp
call edi
test eax, eax
je 0x477a53
cmp dword [esp + 0x64], 4
jne 0x477a66
cmp dword [esp + 0x10], 3
jne 0x477a83
lea eax, [esp + 0x24]
push 2
push eax
push 0xfffffffffffffff4
push esi
mov dword [esp + 0x30], 0xfffffff4
mov dword [esp + 0x34], 0xffffffff
call ebx
cmp eax, 0xffffffff
jne 0x477948
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477a53
lea ecx, [esp + 0x64]
push ebp
push ecx
lea edx, [esp + 0x18]
push 4
push edx
push esi
call edi
test eax, eax
je 0x477a53
cmp dword [esp + 0x64], 4
jne 0x477a49
cmp dword [esp + 0x10], 2
jne 0x477a66
lea eax, [esp + 0x24]
push 2
push eax
push 0xfffffffffffffff0
push esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], 0xfffffff0
mov dword [esp + 0x34], 0xffffffff
call ebx
cmp eax, 0xffffffff
jne 0x4779a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477a53
lea ecx, [esp + 0x64]
push ebp
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
call edi
test eax, eax
je 0x477a53
cmp dword [esp + 0x14], 0xa2f0
jne 0x477a83
lea eax, [esp + 0x24]
push 1
push eax
push 0xffff5d0c
push esi
mov dword [esp + 0x30], 0xffff5d0c
mov dword [esp + 0x34], 0xffffffff
call ebx
cmp eax, 0xffffffff
jne 0x4779fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x477a53
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x60]
lea ecx, [esp + 0x18]
push ebp
push ecx
push edx
push eax
push esi
mov dword [esp + 0x2c], ebp
call edi
test eax, eax
je 0x477a53
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x68]
cmp ecx, eax
jne 0x477a4d
push esi
mov dword [edx], 1
mov dword [esp + 0x20], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
mov edx, dword [esp + 0x68]
mov dword [edx], 5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
mov eax, dword [esp + 0x68]
push esi
mov dword [eax], 5
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
mov ecx, dword [esp + 0x68]
push esi
mov dword [ecx], 5
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x4c
ret
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x4c
ret