Function at 0x497400
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x28
push ebx
mov ebx, ecx
mov dword [esp + 0x14], edx
push ebp
mov ebp, dword [esp + 0x3c]
push esi
movzx eax, byte [ebx + 6]
mov ecx, dword [ebx + 0x38]
mov esi, dword [esp + 0x38]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x3c]
push edi
movzx edi, word [ebx + 0x12]
mov dword [esp + 0x34], ebx
lea eax, [eax + ecx*2]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], eax
add ecx, esi
movzx eax, byte [ebx + 1]
add eax, edi
mov dword [esp + 0x24], ecx
add eax, edx
mov dword [esp + 0x2c], eax
cmp edx, esi
jge 0x497489
mov eax, esi
mov ecx, ebx
sub eax, edx
push ebp
push eax
call fcn.00497320
mov edx, dword [ebx + 0x40]
lea ecx, [edi + edi]
mov esi, eax
push ecx
lea ecx, [edx + esi*2]
push ecx
push edx
call fcn.00643b60
mov eax, dword [esp + 0x40]
add esp, 0x14
mov ecx, dword [esp + 0x24]
sub edi, esi
mov esi, dword [esp + 0x3c]
mov dword [esp + 0x14], edi
cmp ecx, eax
jge 0x4974a3
sub eax, ecx
mov edx, ecx
push ebp
push eax
mov ecx, ebx
call fcn.00497320
add esp, 8
sub edi, eax
mov dword [esp + 0x14], edi
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
movzx ecx, byte [eax + edx + 5]
movzx eax, byte [eax + edx + 6]
shl ecx, 8
or ecx, eax
dec ecx
movzx eax, cx
inc eax
add eax, edx
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x18]
jb 0x497637
mov edx, dword [esp + 0x20]
cmp esi, edx
jge 0x497532
mov eax, edx
mov edx, dword [esp + 0x40]
sub eax, esi
mov esi, dword [ebx + 0x40]
cmp edx, eax
cmovge edx, eax
lea eax, [edi + edi]
push eax
push esi
mov dword [esp + 0x2c], edx
lea eax, [esi + edx*2]
push eax
call fcn.00643b60
mov eax, dword [esp + 0x48]
add esp, 0xc
mov edx, dword [esp + 0x18]
mov ecx, ebx
push ebp
push dword [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push esi
push eax
call fcn.00497240
add esp, 0x14
test eax, eax
jne 0x497637
add edi, dword [esp + 0x24]
mov esi, dword [esp + 0x3c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x14], edi
xor ecx, ecx
mov dword [esp + 0x2c], ecx
cmp byte [ebx + 1], cl
jbe 0x4975c9
lea eax, [ebx + 0x16]
mov dword [esp + 0x24], eax
movzx edi, word [eax]
sub edi, esi
add edi, edx
js 0x4975ad
cmp edi, dword [esp + 0x40]
jge 0x4975ad
mov eax, dword [ebx + 0x40]
lea esi, [eax + edi*2]
mov eax, dword [esp + 0x14]
sub eax, edi
add eax, eax
push eax
lea eax, [esi + 2]
push esi
push eax
call fcn.00643b60
mov eax, dword [esp + 0x48]
add esp, 0xc
mov edx, dword [esp + 0x18]
add eax, edi
inc dword [esp + 0x14]
mov ecx, ebx
push ebp
push 1
push eax
lea eax, [esp + 0x28]
push esi
push eax
call fcn.00497240
add esp, 0x14
test eax, eax
jne 0x497637
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
add eax, 2
inc ecx
mov dword [esp + 0x24], eax
movzx eax, byte [ebx + 1]
cmp ecx, eax
mov dword [esp + 0x2c], ecx
mov eax, dword [esp + 0x24]
jl 0x497548
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x40]
mov edx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x44]
lea ecx, [eax + edi*2]
mov eax, ebp
sub eax, edi
push eax
lea eax, [edi + esi]
push eax
push ecx
lea eax, [esp + 0x2c]
mov ecx, ebx
push eax
call fcn.00497240
add esp, 0x14
test eax, eax
jne 0x497637
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
movzx eax, bp
mov word [ebx + 0x12], ax
shr eax, 8
mov byte [ebx + 1], 0
mov byte [edx + ecx + 3], al
mov al, byte [ebx + 0x12]
mov ebx, ecx
mov ecx, dword [esp + 0x1c]
mov byte [edx + ebx + 4], al
mov eax, ecx
sub eax, ebx
sub cl, bl
sar eax, 8
mov byte [edx + ebx + 5], al
xor eax, eax
mov byte [edx + ebx + 6], cl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x40]
mov ebx, eax
mov esi, dword [edx + 0xc]
test eax, eax
jle 0x497689
mov eax, dword [esp + 0x3c]
lea edi, [eax + eax]
lea ebp, [eax*4]
cmp word [edi + esi], 0
jne 0x49767a
mov eax, dword [edx + 8]
mov ecx, dword [edx + 4]
mov esi, dword [edx + 0xc]
push dword [eax + ebp]
mov eax, dword [ecx + 0x4c]
push ecx
call eax
mov edx, dword [esp + 0x4c]
add esp, 8
mov word [edi + esi], ax
dec ebx
add ebp, 4
add edi, 2
mov eax, esi
test ebx, ebx
jg 0x497656
jmp 0x49768b
mov eax, esi
mov ecx, dword [esp + 0x3c]
lea eax, [eax + ecx*2]
push eax
mov eax, dword [edx + 8]
mov edx, dword [esp + 0x44]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x38]
push eax
call fcn.00497100
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret