Function at 0x516130
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, ecx
push ebx
sub esp, 0xac
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x51617b
js 0x5161b0
sub ecx, 0xb
cmp ecx, 1
ja 0x5161b0
cmp dword [ebp + 8], 4
je 0x5161b0
cmp dword [esi + 8], 2
je 0x516840
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xc
je 0x516185
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
cmp dword [ebp + 8], 0x19e
jne case.0x5162bf.0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
test eax, eax
je case.0x5162bf.0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x10]
cmp dword [eax + 0x80], 0x19c
jne case.0x5162bf.0
lea esi, [esi]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov ecx, ebx
mov dword [esp], eax
call fcn.005d21d0
sub esp, 4
test al, al
je 0x5161d4
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 0xc
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x7c]
test al, al
jne case.0x5162bf.0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0xa4]
test al, al
jne case.0x5162bf.0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x6c]
test al, al
jne case.0x5162bf.0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x6c]
test al, al
jne case.0x5162bf.0
cmp dword [ebp + 8], 0xde
jle 0x516950
cmp dword [ebp + 8], 0x146
je 0x5168b4
jg 0x516b50
cmp dword [ebp + 8], 0x140
je 0x5168c3
jle 0x5168d2
cmp dword [ebp + 8], 0x143
je 0x516b8f
nop
jg 0x516924
cmp dword [ebp + 8], 0x141
je 0x5168a5
cmp dword [ebp + 8], 0x142
mov dword [ebp - 0x8c], 9
jne 0x51687d
lea esi, [esi]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
test eax, eax
je 0x5162b0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
mov ecx, esi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x8c]
mov dword [esp], eax
call fcn.00515970
sub esp, 8
jmp 0x51617b
mov eax, dword [ebp - 0x8c]
cmp eax, 0xa
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d24f0]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 9
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d251c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
lea esi, [esi]
jmp dword [eax*4 + 0x6d2544]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d2570]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
nop
jmp dword [eax*4 + 0x6d259c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d25c8]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
nop
jmp dword [eax*4 + 0x6d25f4]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d2620]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
nop
jmp dword [eax*4 + 0x6d264c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
jmp dword [eax*4 + 0x6d2678]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xa
ja case.0x5162bf.0
nop
jmp dword [eax*4 + 0x6d26a4]
mov edx, 0x38
lea esi, [esi]
mov eax, dword [edi]
mov ecx, edi
mov dword [ebp - 0x98], edx
lea ebx, [ebp - 0x84]
call dword [eax + 0x90]
mov ecx, edi
mov dword [ebp - 0x90], eax
mov eax, dword [edi]
call dword [eax + 0x8c]
mov ecx, edi
mov dword [ebp - 0x94], eax
mov eax, dword [edi]
call dword [eax + 0x88]
mov edx, dword [ebp - 0x90]
mov ecx, ebx
mov dword [esp + 0x14], 0
mov dword [esp + 4], 0
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x94]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x8c]
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.005b3f70
mov eax, dword [edi]
mov ecx, edi
sub esp, 0x18
call dword [eax]
mov edx, dword [ebp - 0x98]
mov dword [esp + 0x18], ebx
mov ecx, dword [eax]
mov dword [esp + 8], ecx
mov ecx, dword [eax + 4]
mov dword [esp + 0xc], ecx
mov ecx, dword [eax + 8]
mov dword [esp + 0x10], ecx
mov eax, dword [eax + 0xc]
mov ecx, esi
mov dword [esp], edx
mov dword [esp + 4], edi
mov dword [esp + 0x14], eax
call fcn.00513430
mov ecx, edi
mov ebx, eax
mov eax, dword [edi]
sub esp, 0x1c
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x30]
test byte [eax + 9], 0x40
jne 0x51648a
mov eax, ebx
jmp 0x51617b
mov dword [esp], ebx
mov ecx, esi
call fcn.00515850
sub esp, 4
test al, al
je 0x516483
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x74]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x2c]
movzx edx, byte [eax + 4]
or byte [eax + 9], 0x40
and edx, 0xffffffc0
or edx, 2
mov byte [eax + 4], dl
mov eax, ebx
jmp 0x51617b
mov edx, 0x65
jmp 0x5163c0
mov edx, 0x54
jmp 0x5163c0
mov edx, 0x3e
jmp 0x5163c0
mov edx, 0x3d
jmp 0x5163c0
mov edx, 0x3a
jmp 0x5163c0
mov edx, 0x39
jmp 0x5163c0
mov edx, 0x3c
jmp 0x5163c0
mov edx, 0x3b
jmp 0x5163c0
mov edx, 0x60
jmp 0x5163c0
mov edx, 0x4f
jmp 0x5163c0
mov edx, 0x13
jmp 0x5163c0
mov edx, 0x63
jmp 0x5163c0
mov edx, 0x52
jmp 0x5163c0
mov edx, 0x19
jmp 0x5163c0
mov edx, 0x18
jmp 0x5163c0
mov edx, 0x16
jmp 0x5163c0
mov edx, 0x15
jmp 0x5163c0
mov edx, 0x42
jmp 0x5163c0
mov edx, 0x17
jmp 0x5163c0
mov edx, 0x64
jmp 0x5163c0
mov edx, 0x53
jmp 0x5163c0
mov edx, 0x2b
jmp 0x5163c0
mov edx, 0x2a
jmp 0x5163c0
mov edx, 0x27
jmp 0x5163c0
mov edx, 0x26
jmp 0x5163c0
mov edx, 0x43
jmp 0x5163c0
mov edx, 0x28
jmp 0x5163c0
mov edx, 0x61
jmp 0x5163c0
mov edx, 0x50
jmp 0x5163c0
mov edx, 0x1f
jmp 0x5163c0
mov edx, 0x1e
jmp 0x5163c0
mov edx, 0x1a
jmp 0x5163c0
mov edx, 0x40
jmp 0x5163c0
mov edx, 0x1d
jmp 0x5163c0
mov edx, 0x1b
jmp 0x5163c0
mov edx, 0x5f
jmp 0x5163c0
mov edx, 0x5e
jmp 0x5163c0
mov edx, 0x5d
jmp 0x5163c0
mov edx, 0x59
jmp 0x5163c0
mov edx, 0x58
jmp 0x5163c0
mov edx, 0x5c
jmp 0x5163c0
mov edx, 0x5b
jmp 0x5163c0
mov edx, 0x5a
jmp 0x5163c0
mov edx, 0x67
jmp 0x5163c0
mov edx, 0x56
jmp 0x5163c0
mov edx, 0x37
jmp 0x5163c0
mov edx, 0x34
jmp 0x5163c0
mov edx, 0x33
jmp 0x5163c0
mov edx, 0x45
jmp 0x5163c0
mov edx, 0x36
jmp 0x5163c0
mov edx, 0x35
jmp 0x5163c0
mov edx, 0x66
jmp 0x5163c0
mov edx, 0x55
jmp 0x5163c0
mov edx, 0x31
jmp 0x5163c0
mov edx, 0x2e
jmp 0x5163c0
mov edx, 0x2d
jmp 0x5163c0
mov edx, 0x44
jmp 0x5163c0
mov edx, 0x30
jmp 0x5163c0
mov edx, 0x2f
jmp 0x5163c0
mov edx, 0x12
jmp 0x5163c0
mov edx, 0xf
jmp 0x5163c0
mov edx, 0xe
jmp 0x5163c0
mov edx, 0x3f
jmp 0x5163c0
mov edx, 0x11
jmp 0x5163c0
mov edx, 0x10
jmp 0x5163c0
mov edx, 0x57
jmp 0x5163c0
mov edx, 0x46
jmp 0x5163c0
mov edx, 0x4e
jmp 0x5163c0
mov edx, 0x4d
jmp 0x5163c0
mov edx, 0x4c
jmp 0x5163c0
mov edx, 0x48
jmp 0x5163c0
mov edx, 0x47
jmp 0x5163c0
mov edx, 0x4b
jmp 0x5163c0
mov edx, 0x4a
jmp 0x5163c0
mov edx, 0x49
jmp 0x5163c0
mov edx, 0x2c
jmp 0x5163c0
mov edx, 0x1c
jmp 0x5163c0
mov edx, 0x32
jmp 0x5163c0
mov edx, 0x14
jmp 0x5163c0
mov edx, 0x29
jmp 0x5163c0
mov edx, 0x22
jmp 0x5163c0
mov edx, 0x62
jmp 0x5163c0
mov edx, 0x51
jmp 0x5163c0
mov edx, 0x25
jmp 0x5163c0
mov edx, 0x24
jmp 0x5163c0
mov edx, 0x20
jmp 0x5163c0
mov edx, 0x41
jmp 0x5163c0
mov edx, 0x23
jmp 0x5163c0
mov edx, 0x21
jmp 0x5163c0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x78]
cmp eax, 0xc
jne 0x51616d
jmp 0x5161b0
cmp dword [ebp + 8], 0x68
jge 0x516a4c
cmp dword [ebp + 8], 3
je 0x516a4c
cmp dword [ebp + 8], 7
je 0x516a4c
cmp dword [ebp + 8], 1
je 0x516a4c
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
mov ecx, edi
mov ebx, eax
mov eax, dword [edi]
call dword [eax + 0x70]
mov ecx, eax
mov eax, dword [eax]
call dword [eax + 0x20]
cmp ebx, eax
jne case.0x5162bf.0
mov eax, edi
nop
jmp 0x5161ca
mov dword [ebp - 0x8c], 8
jmp 0x516280
mov dword [ebp - 0x8c], 3
jmp 0x516280
mov dword [ebp - 0x8c], 7
jmp 0x516280
cmp dword [ebp + 8], 0x13d
je 0x516906
jle 0x516c28
cmp dword [ebp + 8], 0x13e
je 0x516915
cmp dword [ebp + 8], 0x13f
mov dword [ebp - 0x8c], 6
je 0x516280
jmp 0x51687d
mov dword [ebp - 0x8c], 4
jmp 0x516280
mov dword [ebp - 0x8c], 5
jmp 0x516280
cmp dword [ebp + 8], 0x144
je 0x516b80
cmp dword [ebp + 8], 0x145
mov dword [ebp - 0x8c], 2
je 0x516280
jmp 0x51687d
cmp dword [ebp + 8], 0xdc
jge 0x516a4c
cmp dword [ebp + 8], 0x79
jg 0x516a18
cmp dword [ebp + 8], 0x76
jge 0x516a4c
cmp dword [ebp + 8], 0x6c
jle 0x516855
cmp dword [ebp + 8], 0x6e
jg 0x516c07
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 4
je 0x516abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 5
je 0x516abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 8
je 0x516abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 9
je 0x516abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 6
je 0x516abb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
cmp eax, 7
je 0x516abb
cmp dword [esi + 8], 2
jne case.0x5162bf.0
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 0xa
jne case.0x5162bf.0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
mov dword [ebp - 0x8c], eax
jmp 0x516280
cmp dword [ebp + 8], 0xab
jg 0x516bd7
cmp dword [ebp + 8], 0xa5
jge 0x516a4c
cmp dword [ebp + 8], 0x8f
je 0x516a4c
jg 0x516c3a
mov eax, dword [ebp + 8]
sub eax, 0x7b
cmp eax, 6
ja 0x51687d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
mov ecx, edi
mov dword [ebp - 0x8c], eax
mov eax, dword [edi]
call dword [eax + 0x70]
mov ecx, eax
mov eax, dword [eax]
call dword [eax + 0x20]
cmp dword [ebp - 0x8c], eax
je 0x5161c8
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
mov ecx, edi
mov dword [ebp - 0x8c], eax
mov eax, dword [edi]
call dword [eax + 0x70]
mov ecx, eax
mov eax, dword [eax]
call dword [eax + 0x20]
mov edx, dword [ebp + 8]
mov ecx, esi
mov dword [esp + 8], edx
mov edx, dword [ebp - 0x8c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.005134a0
sub esp, 0xc
test al, al
jne 0x516a06
xor eax, eax
jmp 0x51617b
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 4
je 0x5161c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 5
je 0x5161c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 8
je 0x5161c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 9
je 0x5161c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 6
je 0x5161c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x70]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x20]
cmp eax, 7
jne 0x5169e5
mov eax, edi
jmp 0x5161ca
cmp dword [ebp + 8], 0x1aa
jle 0x516b9e
cmp dword [ebp + 8], 0x208
je 0x516a4c
jg 0x516c16
cmp dword [ebp + 8], 0x1ac
jle 0x516985
jmp 0x51687d
mov dword [ebp - 0x8c], 1
jmp 0x516280
mov dword [ebp - 0x8c], 0xa
jmp 0x516280
cmp dword [ebp + 8], 0x1a6
jge 0x516a4c
cmp dword [ebp + 8], 0x1a1
jg 0x516c4c
cmp dword [ebp + 8], 0x19e
jge 0x516a4c
cmp dword [ebp + 8], 0x19b
jne 0x51687d
jmp 0x516a4c
cmp dword [ebp + 8], 0xae
jl 0x51687d
cmp dword [ebp + 8], 0xb0
jle 0x516a4c
mov eax, dword [ebp + 8]
sub eax, 0xd8
cmp eax, 2
ja 0x51687d
jmp 0x516a4c
cmp dword [ebp + 8], 0x73
jg 0x51687d
jmp 0x516a4c
cmp dword [ebp + 8], 0x219
jne 0x51687d
jmp 0x516a4c
cmp dword [ebp + 8], 0x137
jne 0x51687d
jmp 0x516a4c
cmp dword [ebp + 8], 0x96
jne 0x51687d
jmp 0x516a4c
mov eax, dword [ebp + 8]
sub eax, 0x1a3
cmp eax, 1
ja 0x51687d
jmp 0x516a4c