Function at 0x498b40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x54
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x64]
push ebx
mov dword [esp + 0x40], eax
mov ebx, 0x20
mov eax, dword [esp + 0x64]
push ebp
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x20], ebx
push esi
push edi
test eax, eax
jle 0x498b79
mov ecx, eax
mov edi, edx
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x78]
mov edi, dword [esp + 0x6c]
xor ecx, ecx
mov dword [esp + 0x2c], ecx
cmp ecx, 3
jne 0x498b8d
lea esi, [ecx - 2]
jmp 0x498b94
mov esi, 0x20
sar esi, cl
xor dl, dl
mov dword [esp + 0x18], esi
mov byte [esp + 0x13], dl
mov ebp, ecx
mov dword [esp + 0x44], ebp
cmp ecx, eax
jge 0x498d8d
mov eax, esi
mov edx, esi
shl eax, 8
neg edx
mov dword [esp + 0x60], eax
lea eax, [esi*4]
mov esi, dword [esp + 0x48]
mov dword [esp + 0x58], eax
mov eax, ecx
shl eax, 8
add edi, eax
shl edx, 8
sub esi, eax
mov dword [esp + 0x5c], edx
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x78]
add eax, 0x10
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], esi
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x20], ecx
jmp 0x498c00
mov edi, dword [esp + 0x74]
cmp dword [edi + ebp*4], 0xffffffff
mov edi, dword [esp + 0x1c]
jne 0x498d5b
test ebp, ebp
jle 0x498c38
mov eax, dword [esp + 0x78]
dec eax
cmp ebp, eax
jge 0x498c38
mov eax, dword [esp + 0x74]
cmp dword [eax + ebp*4 - 4], 0
jne 0x498c38
cmp dword [eax + ebp*4 + 4], 0
jne 0x498c38
xor ecx, ecx
jmp 0x498d3c
mov eax, dword [ecx]
xor esi, esi
mov dword [esp + 0x54], eax
mov edx, 0x400
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x14], 1
cmp ebx, 1
jl 0x498d21
mov ecx, dword [esp + 0x24]
lea eax, [ebx + ebx]
sub ecx, eax
mov dword [esp + 0x50], ecx
jmp 0x498c70
mov eax, ecx
mov dword [esp + 0x30], edi
mov edx, 4
mov dword [esp + 0x34], eax
xor ebx, ebx
mov dword [esp + 0x38], edx
mov ecx, edi
mov esi, ecx
cmp eax, 8
jle 0x498c93
mov eax, 8
lea ebp, [ecx + eax]
cmp ecx, ebp
jae 0x498cd5
mov eax, dword [esp + 0x14]
lea edi, [ecx + eax]
mov al, byte [edi + eax]
mov dl, byte [edi]
sub al, dl
sub dl, byte [esi]
movsx ecx, al
movsx eax, dl
sub eax, ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x20
jl 0x498cc1
mov eax, 0x20
add ebx, eax
inc esi
mov eax, dword [esp + 0x14]
inc edi
cmp esi, ebp
jb 0x498ca1
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
add ecx, 0x40
sub eax, 0x40
mov dword [esp + 0x30], ecx
sub edx, 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
jne 0x498c87
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
cmp ebx, edx
jge 0x498dba
mov esi, eax
mov edx, ebx
mov dword [esp + 0x40], esi
mov dword [esp + 0x3c], edx
cmp ebx, 0x10
jge 0x498dbe
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x1c]
imul edx, dword [esp + 0x54]
xor ecx, ecx
mov eax, dword [esp + 0x74]
cmp edx, 0xc000
setge cl
dec ecx
and ecx, esi
mov esi, dword [esp + 0x24]
mov dword [eax + ebp*4], ecx
mov eax, ebx
cdq
sub eax, edx
mov edx, dword [esp + 0x78]
sar eax, 1
cmp ecx, eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
jle 0x498d5b
mov byte [esp + 0x13], 1
add ecx, dword [esp + 0x58]
add ebp, eax
add esi, dword [esp + 0x5c]
add edi, dword [esp + 0x60]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x1c], edi
cmp ebp, edx
jl 0x498c00
mov dl, byte [esp + 0x13]
mov ecx, dword [esp + 0x2c]
test dl, dl
jne 0x498d9a
mov eax, ebx
cdq
sub eax, edx
mov ebx, eax
sar ebx, 1
mov dword [esp + 0x28], ebx
mov eax, dword [esp + 0x78]
inc ecx
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x2c], ecx
cmp ecx, 4
jl 0x498b83
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 0x14
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x28]
inc eax
mov ecx, dword [esp + 0x50]
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
cmp eax, ebx
jle 0x498c70
jmp 0x498d19