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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
xor ecx, ecx
push edi
mov dword [esp + 0x1c], ecx
cmp dword [esi + 0xb4], ecx
jne 0x4821c9
cmp dword [esp + 0x4c], ecx
je 0x4821c9
mov eax, dword [esi + 0x10c]
mov dword [esp + 0x10], eax
jmp 0x4821d3
mov edx, dword [esi + 0x110]
mov dword [esp + 0x10], edx
cmp dword [esi + 0x78], ecx
je 0x4821e2
mov eax, dword [esi + 0x16c]
mov dword [esp + 0x2c], eax
cmp dword [esi + 0x100], 1
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x3c]
mov ebp, edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x4c], edi
jne 0x482226
mov ebx, dword [esi + 0x31c]
lea eax, [edx + edx*8]
mov eax, dword [ebx + eax*4]
dec eax
cmp eax, dword [esp + 0x38]
jne 0x482219
lea eax, [edx + 1]
mov dword [esp + 0x14], eax
mov ebp, eax
cmp dword [esp + 0x40], ecx
jne 0x482226
lea eax, [edi - 1]
mov dword [esp + 0x4c], eax
cmp ebp, dword [esp + 0x4c]
mov dword [esp + 0x18], ebp
jg 0x48237f
lea ecx, [ebp + ebp*8]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 0x31c]
add ecx, eax
mov eax, dword [ecx + 8]
xor ebx, ebx
cmp eax, ebx
je 0x48235d
cmp word [eax], bx
je 0x48235d
mov ecx, dword [ecx]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov ebx, dword [esi + 0x108]
push ebx
lea edx, [esp + 0x24]
push edx
lea edx, [esp + 0x2c]
push edx
dec ecx
push ecx
push eax
call fcn.00470110
mov eax, dword [esp + 0x34]
mov ecx, dword [0x5c3198]
cdq
idiv ecx
add esp, 0x14
cmp dword [esp + 0x44], 0
mov edi, eax
je 0x4822a0
add edi, dword [esp + 0x10]
jmp 0x4822b7
test edi, edi
je 0x482355
sub edi, dword [esp + 0x10]
mov edx, 0
sets dl
dec edx
and edi, edx
xor ebp, ebp
cmp dword [esi + 0x88], ebp
jne 0x4822f9
xor eax, eax
cdq
idiv ebx
mov eax, ebx
sub eax, edx
cdq
idiv ecx
cmp edi, eax
jl 0x4822f9
mov ebx, dword [esi + 0x10c]
mov ecx, edi
sub ecx, eax
mov eax, ecx
cdq
idiv ebx
mov ebp, 1
imul ebx, eax
sub ecx, ebx
test eax, eax
jle 0x4822f1
lea ebp, [eax + 1]
test ecx, ecx
jle 0x4822ff
add ebp, ecx
jmp 0x4822ff
test edi, edi
jle 0x4822ff
mov ebp, edi
xor ecx, ecx
mov eax, ebp
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ff272
add esp, 4
push 0
mov ebx, eax
push edi
push ebx
mov ecx, esi
call fcn.00470780
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x24]
push 0
push eax
mov eax, dword [esp + 0x20]
push ebp
push ebx
push eax
push ecx
push eax
push 0
mov ecx, esi
call fcn.00481920
add dword [esp + 0x1c], eax
push ebx
call fcn.004ff267
mov ebp, dword [esp + 0x18]
add esp, 4
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
inc eax
add ecx, 0x24
cmp eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ecx
jle 0x482240
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
cmp eax, 1
jne 0x4823a9
cmp ecx, eax
jle 0x4823ce
mov eax, dword [esi + 0x2fc]
sub eax, 1
js 0x4823ce
mov ebx, dword [esi + 0x2f8]
lea eax, [eax + eax*2]
shl eax, 4
mov dword [ebx + eax + 0x24], ecx
jmp 0x4823ce
cmp eax, 2
jne 0x4823ce
cmp ecx, 1
jle 0x4823ce
mov eax, dword [esi + 0x310]
sub eax, 1
js 0x4823ce
mov ebx, dword [esi + 0x30c]
lea eax, [eax + eax*2]
shl eax, 4
mov dword [eax + ebx + 0x24], ecx
xor eax, eax
mov dword [esi + 0x180], edx
mov dword [esi + 0x184], eax
cmp dword [esi + 0x78], eax
jne 0x4823e9
cmp dword [esi + 0x84], eax
je 0x482405
mov ecx, dword [esp + 0x2c]
cmp ecx, dword [esi + 0x16c]
je 0x482405
mov dword [esi + 0x188], 0xffffffff
mov dword [esi + 0x18c], eax
cmp dword [esi + 0x100], eax
je 0x4824ac
sub ebp, edx
neg ebp
sbb ebp, ebp
and ebp, dword [esp + 0x38]
mov dword [esi + 0x100], 1
mov dword [esi + 0x194], ebp
mov dword [esi + 0x190], edx
cmp dword [esp + 0x4c], edi
je 0x482443
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x19c], ecx
jmp 0x482470
mov ecx, dword [esi + 0x2d0]
dec ecx
cmp edi, ecx
jne 0x482469
mov dword [esi + 0x198], edi
lea ecx, [edi + edi*8]
mov edi, dword [esi + 0x31c]
mov ecx, dword [edi + ecx*4]
dec ecx
mov dword [esi + 0x19c], ecx
jmp 0x482476
inc edi
mov dword [esi + 0x19c], eax
mov dword [esi + 0x198], edi
cmp dword [esi + 0x1a0], eax
jl 0x4824a0
mov edx, dword [esi + 0x198]
mov eax, dword [esi + 0x19c]
pop edi
mov dword [esi + 0x17c], eax
mov dword [esi + 0x178], edx
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
mov dword [esi + 0x17c], ebp
mov dword [esi + 0x178], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c