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

Disassembly:
mov eax, dword [esp + 0x40]
cmp dword [eax + 0x30], 0
je 0x498cfe
mov edx, dword [esp]
mov ecx, dword [edx + 0x9c]
cmp ecx, dword [esp + 0xc]
jae 0x498680
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x20], edx
and al, 0x20
mov ecx, dword [esp + 0x20]
add ecx, ecx
mov dword [esp + 0x24], ecx
xor eax, eax
mov dword [esp + 0x4c], eax
jmp 0x4986b8
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 0x20]
mov edx, dword [esp + 0x40]
mov ecx, dword [edx + 0xc]
xor edx, edx
div ecx
mov dword [esp + 0x20], edx
cmp dword [esp + 0x20], 0
jne 0x4986a8
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x20], eax
mov edx, dword [esp + 0x20]
mov dword [esp + 0x24], edx
mov dword [esp + 0x4c], 1
mov ecx, dword [esp]
cmp dword [ecx + 0x9c], 0
jbe 0x498719
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
add dword [esp + 0x24], edx
mov ecx, dword [esp + 0x24]
push ecx
push 0
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x48]
mov ecx, dword [eax + 0x9c]
mov eax, dword [esp + 0x10]
dec ecx
imul ecx, dword [edx + 0xc]
mov edx, dword [esp + 0x20]
mov edx, dword [eax + edx*4 + 0x48]
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
call dword [ebx + 0x20]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0xc]
shl edx, 2
add dword [esp + 0x28], edx
xor ecx, ecx
mov dword [esp + 0x48], ecx
jmp 0x498744
mov eax, dword [esp + 0x24]
push eax
push 0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
mov ebx, dword [eax + 4]
mov edx, dword [edx + ecx*4 + 0x48]
xor ecx, ecx
call dword [ebx + 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], 1
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 8]
shl ecx, 3
mov edx, dword [eax + 0x70]
lea ecx, [ecx + ecx*2]
add edx, ecx
mov dword [esp + 0x50], edx
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x4c]
mov dword [esp + 0x54], edx
mov ecx, dword [esp + 0x54]
movzx eax, word [ecx]
mov dword [esp + 0x58], eax
mov edx, dword [esp + 0x54]
movzx ecx, word [edx + 2]
mov dword [esp + 0x5c], ecx
mov eax, dword [esp + 0x54]
movzx edx, word [eax + 0x10]
mov dword [esp + 0x64], edx
mov ecx, dword [esp + 0x54]
movzx eax, word [ecx + 0x20]
mov dword [esp + 0x6c], eax
mov edx, dword [esp + 0x54]
movzx ecx, word [edx + 0x12]
mov dword [esp + 0x68], ecx
mov eax, dword [esp + 0x54]
movzx edx, word [eax + 4]
mov dword [esp + 0x60], edx
mov ecx, dword [esp]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx + 0x1c0]
mov ecx, dword [eax + edx*4 + 4]
mov dword [esp + 0x44], ecx
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax + edx*4]
xor eax, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x28]
mov ecx, edx
mov dword [esp + 0x94], ecx
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x20]
jge 0x498cfe
mov edx, dword [esp + 0x94]
mov ecx, dword [edx]
mov dword [esp + 0x2c], ecx
cmp dword [esp + 0x48], 0
je 0x498817
cmp dword [esp + 0x1c], 0
jne 0x498817
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
jmp 0x498825
mov edx, dword [esp + 0x94]
mov ecx, dword [edx - 4]
mov dword [esp + 0x30], ecx
cmp dword [esp + 0x4c], 0
je 0x498841
mov eax, dword [esp + 0x20]
dec eax
cmp eax, dword [esp + 0x1c]
jne 0x498841
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x34], edx
jmp 0x49884f
mov ecx, dword [esp + 0x94]
mov eax, dword [ecx + 4]
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x30]
movsx ecx, word [edx]
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], ecx
mov dword [esp + 0x70], ecx
mov eax, dword [esp + 0x2c]
movsx edx, word [eax]
mov dword [esp + 0x80], edx
mov dword [esp + 0x7c], edx
mov eax, dword [esp + 0x34]
mov esi, edx
movsx edx, word [eax]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x88], edx
mov dword [esp + 0x84], edx
xor eax, eax
mov dword [esp + 0x3c], eax
xor edx, edx
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 0x1c]
dec eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
ja 0x498cd6
lea edx, [esp + 0x98]
mov ecx, 1
mov eax, dword [esp + 0x2c]
call fcn.0049c840
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jae 0x49890a
mov edx, dword [esp + 0x30]
movsx ecx, word [edx + 0x80]
mov dword [esp + 0x78], ecx
mov eax, dword [esp + 0x2c]
movsx edx, word [eax + 0x80]
mov dword [esp + 0x80], edx
mov ecx, dword [esp + 0x34]
movsx eax, word [ecx + 0x80]
mov dword [esp + 0x8c], eax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 4]
test ebx, ebx
je 0x4989ac
invalid
xchg ebx, eax
add byte [eax], al
invalid
cmp word [esp + 0x9a], 0
jne 0x4989ac
mov ecx, esi
sub ecx, dword [esp + 0x80]
imul ecx, dword [esp + 0x58]
shl ecx, 2
lea ecx, [ecx + ecx*8]
test ecx, ecx
jl 0x498972
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x5c]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x4989a4
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x4989a4
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x4989a4
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x5c]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x4989a2
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x4989a2
mov ecx, ebx
mov eax, 1
add byte [eax], al
add bl, dl
loopne 0x4989ea
neg eax
mov word [esp + 0x9a], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 8]
test ebx, ebx
je 0x498a51
cmp word [esp + 0xa8], 0
jne 0x498a51
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x88]
imul dword [esp + 0x58]
mov ecx, eax
shl ecx, 2
lea ecx, [ecx + ecx*8]
test ecx, ecx
jl 0x498a17
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x64]
invalid
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x64]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498a47
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498a47
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xa8], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0xc]
test ebx, ebx
je 0x498af9
cmp word [esp + 0xb8], 0
jne 0x498af9
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x7c]
add eax, dword [esp + 0x88]
add edx, edx
sub eax, edx
imul dword [esp + 0x58]
lea ecx, [eax + eax*8]
test ecx, ecx
jl 0x498abf
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x6c]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498aef
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498aef
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xb8], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0x10]
test ebx, ebx
je 0x498ba4
cmp word [esp + 0xaa], 0
jne 0x498ba4
mov eax, dword [esp + 0x70]
sub eax, dword [esp + 0x78]
sub eax, dword [esp + 0x84]
add eax, dword [esp + 0x8c]
imul dword [esp + 0x58]
lea ecx, [eax + eax*4]
test ecx, ecx
jl 0x498b6a
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x68]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498b9c
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498b9c
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x498b9c
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x68]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498b9a
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498b9a
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0xaa], ax
mov edx, dword [esp + 0x50]
mov ebx, dword [edx + 0x14]
test ebx, ebx
je 0x498c49
cmp word [esp + 0x9c], 0
jne 0x498c49
add esi, dword [esp + 0x80]
mov eax, dword [esp + 0x7c]
add eax, eax
sub esi, eax
imul esi, dword [esp + 0x58]
lea ecx, [esi + esi*8]
test ecx, ecx
jl 0x498c0f
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x60]
shl eax, 7
shl edx, 8
add eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498c41
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498c41
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
jmp 0x498c41
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x60]
shl eax, 7
shl edx, 8
sub eax, ecx
mov ecx, edx
cdq
idiv ecx
test ebx, ebx
jle 0x498c3f
mov ecx, ebx
mov edx, 1
shl edx, cl
cmp eax, edx
jl 0x498c3f
mov ecx, ebx
mov eax, 1
shl eax, cl
dec eax
neg eax
mov word [esp + 0x9c], ax
mov edx, dword [esp + 0x38]
push edx
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0xa0]
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 8]
call dword [esp + 0x4c]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x70], edx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x74], ecx
mov esi, dword [esp + 0x7c]
mov eax, dword [esp + 0x80]
mov dword [esp + 0x7c], eax
mov edx, dword [esp + 0x88]
mov dword [esp + 0x84], edx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x88], ecx
add dword [esp + 0x2c], 0x80
add dword [esp + 0x30], 0x80
add dword [esp + 0x34], 0x80
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x24]
add dword [esp + 0x3c], edx
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
jbe fcn.004988b8
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 0x24]
shl edx, 2
add dword [esp + 0x38], edx
inc dword [esp + 0x1c]
add dword [esp + 0x94], 4
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x20]
jl 0x4987f2
inc dword [esp + 0x18]
add dword [esp + 0x40], 0x54
mov eax, dword [esp]
mov edx, dword [eax + 0x24]
cmp edx, dword [esp + 0x18]
jg 0x498646
mov ecx, dword [esp]
inc dword [ecx + 0x9c]
mov eax, dword [ecx + 0x9c]
mov edx, dword [esp]
cmp eax, dword [edx + 0x140]
jae 0x498d38
mov eax, 3
jmp 0x498d3d
mov eax, 4
add esp, 0x118
pop esi
pop ebx
ret