Function at 0x475f9d
Capabilities:
Parse pe header

Disassembly:
push 0x160
mov eax, 0x51ed79
call fcn.004d8af2
mov ebx, ecx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x14c], ebx
xor eax, eax
push eax
push eax
push 3
push eax
push eax
push 3
mov dword [ebp - 4], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x150], esi
mov byte [ebp - 4], 1
cmp esi, 0xffffffff
je 0x4762fe
test esi, esi
je 0x4762fe
lea eax, [ebp - 0x50]
mov edx, esi
push 0x40
push eax
lea ecx, [ebp - 0x168]
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 3
cmp dword [ebp - 0x168], 0
jge 0x47608e
cmp dword [ebp - 0x164], 0
mov eax, 0x2153
mov edi, dword [ebp - 0x160]
cmovne eax, dword [ebp - 0x164]
push eax
push dword [ebp - 0x168]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x14c], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x15c]
mov dword [esi], eax
call fcn.00406620
lea eax, [ebp - 0x15c]
mov byte [ebp - 4], 4
push eax
mov ecx, ebx
call fcn.0040121b
mov ecx, dword [ebp - 0x154]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x150]
call fcn.00427477
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
jmp 0x476366
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x160]
add ecx, 0xfffffff0
call fcn.00407189
mov eax, 0x5a4d
cmp word [ebp - 0x50], ax
je 0x4760d1
push 0x2154
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x15c]
call fcn.00406620
mov byte [ebp - 4], 5
jmp 0x476339
mov eax, dword [ebp - 0x14]
push 0
cdq
mov edi, eax
mov eax, edx
push 0
push eax
push edi
push esi
mov dword [ebp - 0x14c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x476130
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2157
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x15c]
call fcn.00406620
mov byte [ebp - 4], 6
jmp 0x476339
lea eax, [ebp - 0x148]
mov edx, esi
push 0xf8
push eax
lea ecx, [ebp - 0x168]
call fcn.0042a333
pop ecx
pop ecx
mov byte [ebp - 4], 7
cmp dword [ebp - 0x168], 0
jge 0x4761c1
cmp dword [ebp - 0x164], 0
mov eax, 0x2159
mov edi, dword [ebp - 0x160]
cmovne eax, dword [ebp - 0x164]
push eax
push dword [ebp - 0x168]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x14c], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x15c]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 8
lea eax, [ebp - 0x15c]
mov ecx, ebx
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x154]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
jmp 0x476350
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x160]
add ecx, 0xfffffff0
call fcn.00407189
cmp dword [ebp - 0x148], 0x4550
je 0x476205
push 0x215a
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x15c]
call fcn.00406620
mov byte [ebp - 4], 9
jmp 0x476339
xor eax, eax
push eax
push eax
push dword [ebp - 0x14c]
mov dword [ebp - 0xac], eax
push edi
push esi
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xf0], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x47626d
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2160
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x15c]
call fcn.00406620
mov byte [ebp - 4], 0xa
jmp 0x476339
lea eax, [ebp - 0x148]
mov edx, esi
push 0xf8
push eax
lea ecx, [ebp - 0x168]
call fcn.0042a260
pop ecx
pop ecx
mov byte [ebp - 4], 0xb
cmp dword [ebp - 0x168], 0
jge 0x4762df
cmp dword [ebp - 0x164], 0
mov eax, 0x2161
mov edi, dword [ebp - 0x160]
cmovne eax, dword [ebp - 0x164]
push eax
push dword [ebp - 0x168]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x14c], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x15c]
mov dword [esi], eax
call fcn.00406620
mov byte [ebp - 4], 0xc
jmp 0x47619d
mov ecx, dword [ebp - 0x160]
lea ecx, [ecx - 0x10]
call fcn.00407189
and dword [ebx], 0
lea ecx, [ebx + 8]
and dword [ebx + 4], 0
call fcn.0040687a
jmp 0x476355
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
push 0x2150
cmovle ecx, eax
mov eax, 0x80004005
test ecx, ecx
cmovs eax, ecx
push eax
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x15c]
call fcn.00406620
mov byte [ebp - 4], 2
lea eax, [ebp - 0x15c]
mov ecx, ebx
push eax
call fcn.0040121b
mov ecx, dword [ebp - 0x154]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x150]
call fcn.00427477
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, ebx
call fcn.004d8aa1
ret