Function at 0x416f27
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x5e3c30]
xor eax, ebp
mov dword [ebp - 0x24], eax
push esi
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x416f5d
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4172f7
push 0
call fcn.0043e61e
pop ecx
push eax
call fcn.00545685
pop ecx
call fcn.00545697
mov dword [ebp - 0x44], eax
push 0x5b17e0
lea ecx, [ebp - 0x40]
call fcn.00407628
mov eax, dword [ebp - 0x44]
and eax, reloc.LUNAR.dll_Ordinal_1
jns 0x416f90
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x416fb0
push 0x5b17e4
lea ecx, [ebp - 0x40]
call fcn.004076b0
push 0x5b17e8
lea ecx, [ebp - 0x40]
call fcn.004076b0
jmp 0x416fbd
push 0x5b17ec
lea ecx, [ebp - 0x40]
call fcn.004076b0
call fcn.00545697
mov esi, eax
call fcn.00545697
cdq
push 0x64
pop ecx
idiv ecx
mov ecx, edx
mov eax, esi
cdq
idiv ecx
mov dword [ebp - 0x48], edx
and dword [ebp - 0x4c], 0
jmp 0x416fe6
mov eax, dword [ebp - 0x4c]
inc eax
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x48]
jge 0x41701f
call fcn.00545697
and eax, reloc.LUNAR.dll_Ordinal_1
jns 0x416fff
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x417012
push 0x5b17f4
lea ecx, [ebp - 0x40]
call fcn.004076b0
jmp 0x41701d
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x40]
call fcn.004076c6
jmp 0x416fdf
lea ecx, [ebp - 0x40]
call fcn.00405e71
push eax
push 0x5b17f8
call fcn.005455c8
pop ecx
pop ecx
lea ecx, [ebp - 0x40]
call fcn.00401d44
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0x4550
je 0x417065
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4172f7
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x50]
mov eax, dword [ebp - 0x20]
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4170b4
push 4
push 0x3000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4170b4
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4172f7
push 0x24
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4170ed
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x8000
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x4172f7
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x18]
and dword [eax + 0xc], 0
mov eax, dword [ebp - 0x18]
and dword [eax + 8], 0
mov eax, dword [ebp - 0x18]
and dword [eax + 0x10], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x14], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x18], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x1c], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x20], ecx
push 4
push 0x1000
mov eax, dword [ebp - 0x20]
push dword [eax + 0x54]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x20]
push dword [eax + 0x54]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.0054ace0
add esp, 0xc
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
add ecx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x18]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x34], ecx
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp + 8]
call fcn.00416636
add esp, 0xc
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0xc]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x1c], ecx
je 0x4171a1
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
call fcn.00416af7
pop ecx
pop ecx
push dword [ebp - 0x18]
call fcn.00416bc5
pop ecx
test eax, eax
jne 0x4171b3
jmp 0x4172ec
push 0
call fcn.0043e61e
pop ecx
push eax
call fcn.00545685
pop ecx
call fcn.00545697
mov dword [ebp - 0x6c], eax
push 0x5b17fc
lea ecx, [ebp - 0x68]
call fcn.00407628
mov eax, dword [ebp - 0x6c]
and eax, reloc.LUNAR.dll_Ordinal_1
jns 0x4171e6
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x417206
push 0x5b1800
lea ecx, [ebp - 0x68]
call fcn.004076b0
push 0x5b1804
lea ecx, [ebp - 0x68]
call fcn.004076b0
jmp 0x417213
push str.o_o_
lea ecx, [ebp - 0x68]
call fcn.004076b0
call fcn.00545697
mov esi, eax
call fcn.00545697
cdq
push 0x64
pop ecx
idiv ecx
mov ecx, edx
mov eax, esi
cdq
idiv ecx
mov dword [ebp - 0x70], edx
and dword [ebp - 0x74], 0
jmp 0x41723c
mov eax, dword [ebp - 0x74]
inc eax
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x70]
jge 0x417275
call fcn.00545697
and eax, reloc.LUNAR.dll_Ordinal_1
jns 0x417255
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x417268
push 0x5b1810
lea ecx, [ebp - 0x68]
call fcn.004076b0
jmp 0x417273
push dword [ebp - 0x74]
lea ecx, [ebp - 0x68]
call fcn.004076c6
jmp 0x417235
lea ecx, [ebp - 0x68]
call fcn.00405e71
push eax
push 0x5b1814
call fcn.005455c8
pop ecx
pop ecx
lea ecx, [ebp - 0x68]
call fcn.00401d44
push dword [ebp - 0x18]
call fcn.0041683d
pop ecx
push dword [ebp - 0x18]
call fcn.00416a98
pop ecx
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
je 0x4172e7
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x14], ecx
push 0
push 1
push dword [ebp - 0xc]
call dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4172dd
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x4172ec
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x10], 1
mov eax, dword [ebp - 0x18]
jmp 0x4172f7
push dword [ebp - 0x18]
call fcn.00417304
pop ecx
xor eax, eax
pop esi
mov ecx, dword [ebp - 0x24]
xor ecx, ebp
call fcn.00543a33
leave
ret