Function at 0x460460
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xb4
mov eax, dword [0x508578]
xor eax, esp
mov dword [esp + 0xb0], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x64]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0xc]
push esi
cdq
mov esi, eax
xor esi, edx
push edi
mov edi, dword [ebx + 0x68]
sub esi, edx
push 0
and esi, 0xffff
push edi
mov dword [ebx + 0x84], 0
mov dword [esp + 0x20], esi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x1c]
push ecx
push 0x4edd20
push edi
call fcn.004415d0
add esp, 0xc
test eax, eax
jne 0x460b76
mov edx, 0x5a4d
mov dword [esp + 0xc], 2
cmp word [esp + 0x1c], dx
jne 0x460b6b
movzx eax, word [esp + 0x1e]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x24]
push ecx
push 0x4edd34
push edi
call fcn.004415d0
add esp, 0xc
test eax, eax
jne 0x460b76
mov cx, word [esp + 0x24]
mov edx, 0x454e
mov eax, 2
mov dword [esp + 0xc], eax
cmp cx, dx
jne 0x46072d
movzx eax, word [esp + 0x26]
movzx ecx, word [esp + 0x1e]
add eax, ecx
push eax
xor esi, esi
push edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], esi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, esi
jne 0x460b76
movzx edx, word [esp + 0x28]
movzx eax, word [esp + 0x26]
sub edx, eax
push edx
push edi
call fcn.004414d0
add esp, 8
mov dword [esp + 0xc], eax
cmp eax, esi
jne 0x460b76
push edi
call fcn.0043f0e0
movzx eax, ax
add esp, 4
mov dword [esp + 0x20], eax
cmp eax, 0x10
jbe 0x4605c1
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00493576
mov esp, ebp
pop ebp
ret
push edi
call fcn.0043f0e0
movzx esi, ax
add esp, 4
test si, si
je 0x460606
push edi
call fcn.0043f0e0
add esp, 4
mov ecx, 0x8008
movzx eax, ax
push edi
cmp si, cx
je 0x46065e
lea edx, [eax + eax*2]
lea eax, [edx*4 + 4]
add dword [edi + 0x20], eax
call fcn.0043f0e0
movzx esi, ax
add esp, 4
test si, si
jne 0x4605d2
mov esi, dword [esp + 0x14]
push edi
call fcn.004415a0
add esp, 4
test si, si
je 0x4605a7
cmp dword [esp + 0x10], 0
je 0x4605a7
movzx eax, si
mov ecx, eax
imul ecx, ecx, 0x76
cmp ecx, dword [edi + 4]
ja 0x4605a7
cmp dword [ebp + 0xc], 0
mov dword [ebx], eax
jl 0x460b72
mov esi, dword [esp + 0x18]
cmp esi, eax
jl 0x460678
mov eax, 6
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb0]
xor ecx, esp
call fcn.00493576
mov esp, ebp
pop ebp
ret
mov esi, eax
call fcn.0043efa0
mov ecx, dword [edi + 0x20]
add esp, 4
sub ecx, dword [edi + 0x24]
lea edx, [eax + ecx + 4]
mov dword [esp + 0x10], edx
jmp 0x46060a
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0xc]
push edx
push 0xac
push eax
call fcn.004418b0
mov dword [ebx + 0x84], eax
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
jne 0x460b76
mov edx, dword [esp + 0x10]
lea ecx, [esi + esi*2]
lea eax, [edx + ecx*4]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b6b
push 0xc
push edi
call fcn.004414d0
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b6b
movzx esi, word [esp + 0x20]
push edi
call fcn.0043f0e0
movzx edx, ax
mov eax, dword [ebx + 0x84]
mov ecx, esi
shl edx, cl
push edi
mov dword [eax], edx
call fcn.0043f0e0
movzx edx, ax
mov eax, dword [ebx + 0x84]
mov ecx, esi
shl edx, cl
push edi
mov dword [eax + 0xa4], edx
add dword [edi + 0x20], 8
call fcn.004415a0
mov ecx, dword [ebx + 0x84]
push ecx
call fcn.004603a0
add esp, 0x10
mov dword [esp + 0xc], eax
jmp 0x460b51
mov edx, 0x4550
cmp cx, dx
jne 0x460b55
movzx eax, word [esp + 0x1e]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x68]
push ecx
push 0x4edd4c
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
cmp dword [esp + 0x68], 0x4550
jne 0x4605a7
mov edx, 0x14c
cmp word [esp + 0x6c], dx
jne 0x4605a7
mov eax, 0xe0
cmp word [esp + 0x70], ax
jne 0x4605a7
mov ecx, 0x10b
cmp word [esp + 0x72], cx
jne 0x4605a7
xor edx, edx
xor esi, esi
mov dword [ebx], 0
cmp dx, word [esp + 0x6e]
jae 0x4605a7
jmp 0x4607d0
lea eax, [esp + 0x54]
push eax
push 0x4edd80
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
mov ecx, dword [esp + 0x74]
cmp ecx, dword [esp + 0x5c]
je 0x460806
inc esi
cmp si, word [esp + 0x6e]
jb 0x4607d0
jmp 0x4605a7
mov edx, dword [esp + 0x64]
push edx
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea eax, [esp + 0x9c]
push eax
push 0x4edda0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
mov ecx, dword [esp + 0x64]
movzx edx, word [esp + 0xaa]
mov dword [esp + 0x14], ecx
movzx ecx, word [esp + 0xa8]
add edx, ecx
mov dword [esp + 0x20], eax
test edx, edx
jle 0x460b51
xor ecx, ecx
mov edx, dword [esp + 0x14]
lea eax, [edx + ecx*8 + 0x10]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x38]
push ecx
push 0x4eddc0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
mov eax, dword [esp + 0x3c]
test eax, eax
jns 0x4605a7
mov edx, dword [esp + 0x64]
and eax, 0x7fffffff
lea esi, [eax + edx]
push esi
push edi
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], esi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea eax, [esp + 0x8c]
push eax
push 0x4edda0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
movzx ecx, word [esp + 0x9a]
movzx edx, word [esp + 0x98]
add ecx, edx
mov dword [esp + 0x30], eax
test ecx, ecx
jle 0x460b2b
xor ecx, ecx
jmp 0x460925
mov esi, dword [esp + 0x40]
lea eax, [esi + ecx*8 + 0x10]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x44]
push ecx
push 0x4eddc0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
mov eax, dword [esp + 0x48]
test eax, eax
jns 0x4605a7
mov edx, dword [esp + 0x64]
and eax, 0x7fffffff
lea esi, [eax + edx]
push esi
push edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x3c], esi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea eax, [esp + 0x7c]
push eax
push 0x4edda0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
movzx ecx, word [esp + 0x8a]
movzx edx, word [esp + 0x88]
add ecx, edx
mov dword [esp + 0x10], eax
test ecx, ecx
jle 0x460b05
xor ecx, ecx
jmp 0x4609d9
mov esi, dword [esp + 0x34]
lea eax, [esi + ecx*8 + 0x10]
push eax
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0x4c]
push ecx
push 0x4eddc0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
test dword [esp + 0x48], 0x80000000
jne 0x4605a7
cmp dword [esp + 0x38], 8
jne 0x460adf
mov edx, dword [esp + 0x50]
add edx, dword [esp + 0x14]
push edx
push edi
call fcn.0043ef10
add esp, 8
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
lea ecx, [esp + 0xac]
push ecx
push 0x4eddd0
push edi
call fcn.004415d0
add esp, 0xc
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b76
mov edx, dword [esp + 0x18]
cmp edx, dword [ebx]
jne 0x460add
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0xc]
push eax
push 0xac
push ecx
call fcn.004418b0
mov ecx, eax
mov eax, dword [esp + 0x18]
add esp, 0xc
mov dword [ebx + 0x84], ecx
test eax, eax
jne 0x460b76
mov edx, dword [esp + 0xac]
sub edx, dword [esp + 0x5c]
add edx, dword [esp + 0x64]
mov dword [ecx], edx
mov eax, dword [ebx + 0x84]
mov ecx, dword [esp + 0xb0]
mov dword [eax + 0xa4], ecx
mov edx, dword [ebx + 0x84]
push edx
call fcn.004603a0
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
jne 0x460b6b
inc dword [ebx]
mov ecx, dword [esp + 0x10]
movzx edx, word [esp + 0x8a]
movzx esi, word [esp + 0x88]
inc ecx
mov dword [esp + 0x10], ecx
movzx ecx, cx
add edx, esi
cmp ecx, edx
jl 0x4609d5
mov ecx, dword [esp + 0x30]
movzx edx, word [esp + 0x9a]
movzx esi, word [esp + 0x98]
inc ecx
mov dword [esp + 0x30], ecx
movzx ecx, cx
add edx, esi
cmp ecx, edx
jl 0x460921
mov ecx, dword [esp + 0x20]
movzx edx, word [esp + 0xaa]
movzx esi, word [esp + 0xa8]
inc ecx
mov dword [esp + 0x20], ecx
movzx ecx, cx
add edx, esi
cmp ecx, edx
jl 0x46086a
mov esi, dword [esp + 0x18]
mov ecx, dword [ebx]
test ecx, ecx
je 0x4605a7
cmp esi, ecx
jge 0x460644
test eax, eax
je 0x460b76
mov edi, ebx
call fcn.00460340
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00493576
mov esp, ebp
pop ebp
ret