Function at 0x476860
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x398
mov eax, dword [0x5954a0]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x29c], 0xffffffff
mov dword [ebp - 4], 0
mov dword [ebp - 0x298], 0
push 0x3c
push 0
lea eax, [ebp - 0x294]
push eax
call fcn.004f8090
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x210], cx
push 0x1fe
push 0
lea edx, [ebp - 0x20e]
push edx
call fcn.004f8090
add esp, 0xc
push 0
push 0
push 0x100
lea eax, [ebp - 0x210]
push eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.004fad12
add esp, 0x24
push str.ugs_router
lea edx, [ebp - 0x210]
push edx
call fcn.004fd061
add esp, 8
test eax, eax
jne 0x476903
xor eax, eax
jmp 0x476b60
push str.proe
lea eax, [ebp - 0x210]
push eax
call fcn.004fd061
add esp, 8
test eax, eax
jne 0x476922
xor eax, eax
jmp 0x476b60
push str.VSLauncher
lea ecx, [ebp - 0x210]
push ecx
call fcn.004fd061
add esp, 8
test eax, eax
jne 0x476941
xor eax, eax
jmp 0x476b60
push 0x54a930
lea edx, [ebp - 0x210]
push edx
call fcn.004fd061
add esp, 8
test eax, eax
jne 0x476960
xor eax, eax
jmp 0x476b60
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x29c], eax
cmp dword [ebp - 0x29c], 0xffffffff
jne 0x476992
xor eax, eax
jmp 0x476b60
push 0
lea ecx, [ebp - 0x2a0]
push ecx
push 0x40
lea edx, [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4769c9
mov ecx, dword [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
movzx edx, word [ebp - 0x250]
cmp edx, 0x5a4d
je 0x4769ec
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
push 0
lea ecx, [ebp - 0x2a0]
push ecx
push 0x40
lea edx, [ebp - 0x298]
push edx
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x476a23
mov ecx, dword [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
push 0
push 0
mov edx, dword [ebp - 0x214]
push edx
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x254], eax
cmp dword [ebp - 0x254], 0xffffffff
jne 0x476a5e
mov ecx, dword [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
mov edx, dword [ebp - 0x254]
add edx, 4
mov dword [ebp - 0x254], edx
push 0
lea eax, [ebp - 0x2a0]
push eax
push 4
lea ecx, [ebp - 0x398]
push ecx
mov edx, dword [ebp - 0x29c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x476aa4
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
cmp dword [ebp - 0x398], 0x4550
je 0x476ac4
mov ecx, dword [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
mov edx, dword [ebp - 0x254]
add edx, 0xf4
mov dword [ebp - 8], edx
push 0
lea eax, [ebp - 0x2a0]
push eax
push 0x14
lea ecx, [ebp - 0x394]
push ecx
mov edx, dword [ebp - 0x29c]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x476b07
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
push 0
lea ecx, [ebp - 0x2a0]
push ecx
push 0xe0
lea edx, [ebp - 0x380]
push edx
mov eax, dword [ebp - 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x476b3e
mov ecx, dword [ebp - 0x29c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x476b60
mov edx, dword [ebp - 0x29c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, word [ebp - 0x33c]
cmp eax, 2
jne 0x476b5e
mov eax, 1
jmp 0x476b60
xor eax, eax
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004f8124
mov esp, ebp
pop ebp
ret