Function at 0x497f20
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb0
mov eax, dword [0x5cfc24]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push 0
mov esi, dword [ebx + 0x68]
mov eax, dword [ebx + 0x64]
push esi
mov dword [ebp - 0x88], eax
mov dword [ebx + 0x84], 0
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498614
lea eax, [ebp - 0x78]
push eax
push 0x51b974
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
test edx, edx
jne 0x498614
mov eax, 0x5a4d
mov dword [ebp - 0x70], 2
push edi
cmp word [ebp - 0x78], ax
jne 0x498607
movzx eax, word [ebp - 0x76]
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x84]
push eax
push 0x51b9e8
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
test edx, edx
jne 0x498613
mov ax, word [ebp - 0x84]
mov ecx, 0x454e
mov edx, 2
mov dword [ebp - 0x70], edx
cmp ax, cx
jne 0x4981a9
movzx eax, word [ebp - 0x76]
movzx ecx, word [ebp - 0x82]
add ecx, eax
xor eax, eax
push ecx
push esi
mov dword [ebp - 0x74], eax
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
movzx ecx, word [ebp - 0x80]
movzx eax, word [ebp - 0x82]
sub ecx, eax
push ecx
push esi
call fcn.004b2c90
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
push esi
call fcn.004b2ed0
movzx eax, ax
push esi
mov dword [ebp - 0x7c], eax
call fcn.004b2ed0
movzx edi, ax
add esp, 8
test di, di
je 0x498098
lea ebx, [ebx]
push esi
call fcn.004b2ed0
add esp, 4
movzx eax, ax
mov ecx, 0x8008
push esi
cmp di, cx
je 0x49818e
lea eax, [eax + eax*2]
lea eax, [eax*4 + 4]
add dword [esi + 0x20], eax
call fcn.004b2ed0
movzx edi, ax
add esp, 4
test di, di
jne 0x498060
xor edi, edi
push esi
call fcn.004b2d60
mov eax, dword [ebp - 0x74]
add esp, 4
test ax, ax
je 0x4985ce
test edi, edi
je 0x4985ce
movzx ecx, ax
imul eax, ecx, 0x76
cmp eax, dword [esi + 4]
ja 0x4985ce
mov eax, dword [ebp + 0xc]
mov dword [ebx], ecx
cmp eax, ecx
jge 0x4985eb
test eax, eax
js 0x498610
lea eax, [ebp - 0x70]
push eax
push 0xac
push dword [ebp - 0x88]
call fcn.004b1940
mov edx, dword [ebp - 0x70]
add esp, 0xc
mov dword [ebx + 0x84], eax
test edx, edx
jne 0x498613
mov eax, dword [ebp + 0xc]
lea eax, [eax + eax*2]
lea eax, [edi + eax*4]
push eax
push esi
call fcn.004b3530
add esp, 8
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x498607
push 0xc
push esi
call fcn.004b2c90
add esp, 8
mov dword [ebp - 0x70], eax
test eax, eax
jne 0x498607
mov eax, dword [ebp - 0x7c]
push esi
movzx edi, ax
call fcn.004b2ed0
movzx edx, ax
mov ecx, edi
mov eax, dword [ebx + 0x84]
shl edx, cl
push esi
mov dword [eax], edx
call fcn.004b2ed0
movzx edx, ax
mov ecx, edi
mov eax, dword [ebx + 0x84]
shl edx, cl
push esi
mov dword [eax + 0xa4], edx
add dword [esi + 0x20], 8
call fcn.004b2d60
push esi
push dword [ebx + 0x84]
call fcn.00498690
mov edx, eax
add esp, 0x14
mov dword [ebp - 0x70], edx
jmp 0x4985c8
mov dword [ebp - 0x74], eax
call fcn.004b2f40
mov edi, dword [esi + 0x20]
add esp, 4
sub edi, dword [esi + 0x24]
add edi, 4
add edi, eax
jmp 0x49809a
mov ecx, 0x4550
cmp ax, cx
jne 0x4985c8
movzx eax, word [ebp - 0x76]
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x18]
push eax
push 0x51ba00
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
cmp dword [ebp - 0x18], 0x4550
jne 0x4985ce
mov eax, 0x14c
cmp word [ebp - 0x14], ax
jne 0x4985ce
mov eax, 0xe0
cmp word [ebp - 0x10], ax
jne 0x4985ce
mov eax, 0x10b
cmp word [ebp - 0xe], ax
jne 0x4985ce
xor eax, eax
mov dword [ebx], edx
xor edi, edi
cmp ax, word [ebp - 0x12]
jae 0x4985ce
jmp 0x498240
lea eax, [ebp - 0x2c]
push eax
push 0x51ba34
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x24]
je 0x498286
inc edi
cmp di, word [ebp - 0x12]
jb 0x498240
pop edi
mov edx, 3
pop esi
mov eax, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x1c]
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x4c]
push eax
push 0x51ba54
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
mov eax, dword [ebp - 0x1c]
movzx ecx, word [ebp - 0x3e]
mov dword [ebp - 0x74], eax
movzx eax, word [ebp - 0x40]
add ecx, eax
mov dword [ebp - 0x7c], edx
test ecx, ecx
jle 0x4985c8
xor edi, edi
jmp 0x4982e0
mov eax, dword [ebp - 0x74]
lea eax, [eax + edi*8]
add eax, 0x10
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0xa0]
push eax
push 0x51ba74
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
mov ecx, dword [ebp - 0x9c]
test ecx, ecx
jns 0x4985ce
mov eax, dword [ebp - 0x1c]
and ecx, 0x7fffffff
add eax, ecx
mov dword [ebp - 0x9c], ecx
push eax
push esi
mov dword [ebp - 0x94], eax
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x5c]
push eax
push 0x51ba54
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
movzx ecx, word [ebp - 0x4e]
mov dword [ebp - 0x90], eax
movzx eax, word [ebp - 0x50]
add ecx, eax
test ecx, ecx
jle 0x4985ac
xor edi, edi
jmp 0x4983a0
mov eax, dword [ebp - 0x94]
lea eax, [eax + edi*8]
add eax, 0x10
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0xa8]
push eax
push 0x51ba74
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
mov ecx, dword [ebp - 0xa4]
test ecx, ecx
jns 0x4985ce
mov eax, dword [ebp - 0x1c]
and ecx, 0x7fffffff
add eax, ecx
mov dword [ebp - 0xa4], ecx
push eax
push esi
mov dword [ebp - 0x98], eax
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x3c]
push eax
push 0x51ba54
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
movzx ecx, word [ebp - 0x2e]
mov dword [ebp - 0x8c], eax
movzx eax, word [ebp - 0x30]
add ecx, eax
test ecx, ecx
jle 0x49858a
xor edi, edi
lea ebx, [ebx]
mov eax, dword [ebp - 0x98]
lea eax, [eax + edi*8]
add eax, 0x10
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0xb0]
push eax
push 0x51ba74
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
test dword [ebp - 0xa4], 0x80000000
jne 0x4985ce
cmp dword [ebp - 0xa0], 8
jne 0x498568
mov eax, dword [ebp - 0xac]
add eax, dword [ebp - 0x74]
push eax
push esi
call fcn.004b3530
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
lea eax, [ebp - 0x6c]
push eax
push 0x51ba84
push esi
call fcn.004b3050
mov edx, eax
add esp, 0xc
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498613
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebx]
jne 0x498566
lea eax, [ebp - 0x70]
push eax
push 0xac
push dword [ebp - 0x88]
call fcn.004b1940
mov edx, dword [ebp - 0x70]
add esp, 0xc
mov dword [ebx + 0x84], eax
test edx, edx
jne 0x498613
mov ecx, dword [ebp - 0x6c]
sub ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
mov ecx, dword [ebx + 0x84]
mov eax, dword [ebp - 0x68]
push esi
mov dword [ecx + 0xa4], eax
push dword [ebx + 0x84]
call fcn.00498690
mov edx, eax
add esp, 8
mov dword [ebp - 0x70], edx
test edx, edx
jne 0x498607
inc dword [ebx]
mov eax, dword [ebp - 0x8c]
movzx ecx, word [ebp - 0x2e]
inc eax
movzx edi, ax
mov dword [ebp - 0x8c], eax
movzx eax, word [ebp - 0x30]
add ecx, eax
cmp edi, ecx
jl 0x498460
mov eax, dword [ebp - 0x90]
movzx ecx, word [ebp - 0x4e]
inc eax
movzx edi, ax
mov dword [ebp - 0x90], eax
movzx eax, word [ebp - 0x50]
add ecx, eax
cmp edi, ecx
jl 0x4983a0
mov eax, dword [ebp - 0x7c]
movzx ecx, word [ebp - 0x3e]
inc eax
movzx edi, ax
mov dword [ebp - 0x7c], eax
movzx eax, word [ebp - 0x40]
add ecx, eax
cmp edi, ecx
jl 0x4982e0
mov eax, dword [ebx]
test eax, eax
jne 0x4985e6
pop edi
mov edx, 3
pop esi
mov eax, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], eax
jl 0x498603
pop edi
mov edx, 6
pop esi
mov eax, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004dde94
mov esp, ebp
pop ebp
ret
test edx, edx
je 0x498613
push ebx
call fcn.00498630
add esp, 4
mov edx, dword [ebp - 0x70]
pop edi
mov ecx, dword [ebp - 4]
mov eax, edx
pop esi
xor ecx, ebp
pop ebx
call fcn.004dde94
mov esp, ebp
pop ebp
ret