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

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x10], eax
xor edx, edx
push esi
push edi
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov eax, dword [ebx + 0x94]
div dword [ebx + 0x98]
or byte [ebx + 0x14], 4
mov ebp, dword [ebp + 0x18]
mov edx, eax
mov esi, dword [ebx + 0x18]
lea edi, [edx - 1]
not edi
lea eax, [ebp - 1]
and edi, eax
inc edi
mov dword [esp + 0x20], edi
cmp ebp, esi
jbe 0x49812c
sub ebp, edi
inc ebp
jmp 0x49813e
lea eax, [edx - 1]
add eax, edi
cmp eax, esi
jbe 0x49813c
mov ebp, esi
sub ebp, edi
inc ebp
jmp 0x49813e
mov ebp, edx
mov dword [esp + 0x1c], ecx
test ebp, ebp
jle 0x4982f8
mov esi, edi
lea esp, [esp]
test ecx, ecx
jne 0x4982f8
mov eax, dword [esp + 0x28]
cmp esi, dword [eax + 0x18]
je 0x4981ca
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x4981ca
push esi
push eax
call fcn.004a6320
add esp, 8
test eax, eax
je 0x4981c6
mov eax, dword [ebx + 0xd4]
push 0
push esi
push dword [eax + 0x2c]
call dword [0x52e358]
mov ecx, eax
add esp, 0xc
test ecx, ecx
jne 0x49819a
mov dword [esp + 0x14], eax
jmp 0x498224
mov eax, dword [ecx + 4]
mov edx, dword [ebx + 0xd4]
cmp dword [eax], 0
jne 0x4981b5
push ecx
push esi
push edx
call fcn.0049ad60
add esp, 0xc
jmp 0x4981bc
inc dword [edx + 0xc]
inc word [eax + 0x1e]
mov dword [esp + 0x14], eax
test eax, eax
je 0x498224
jmp 0x49820d
mov ecx, dword [esp + 0x10]
mov eax, dword [0x52e2d4]
cdq
idiv dword [ebx + 0x98]
inc eax
cmp esi, eax
je 0x498228
push 0
lea eax, [esp + 0x18]
push eax
mov eax, dword [ebx + 0xcc]
push esi
push ebx
call eax
mov ecx, eax
add esp, 0x10
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x498228
push dword [esp + 0x14]
call fcn.004993a0
mov dword [esp + 0x14], eax
add esp, 4
mov eax, dword [esp + 0x14]
test byte [eax + 0x1c], 8
je 0x49821b
mov dword [esp + 0x18], 1
push eax
call fcn.004c5db0
add esp, 4
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
inc esi
inc eax
mov dword [esp + 0x1c], eax
cmp eax, ebp
jl 0x498150
test ecx, ecx
jne 0x4982f8
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4982f8
mov edi, edi
mov eax, dword [ebx + 0xd4]
push 0
push edi
push dword [eax + 0x2c]
call dword [0x52e358]
mov ecx, eax
add esp, 0xc
test ecx, ecx
je 0x4982e8
mov eax, dword [ecx + 4]
mov edx, dword [ebx + 0xd4]
cmp dword [eax], 0
jne 0x498286
push ecx
push edi
push edx
call fcn.0049ad60
add esp, 0xc
jmp 0x49828d
inc dword [edx + 0xc]
inc word [eax + 0x1e]
test eax, eax
je 0x4982e8
or word [eax + 0x1c], 8
test byte [eax + 0x1c], 0x20
je 0x4982df
mov edx, dword [eax + 0x14]
dec dword [edx + 0x78]
mov ecx, dword [edx + 0x88]
mov dword [eax + 0x10], ecx
mov esi, dword [edx + 0x3c]
mov dword [edx + 0x88], eax
push dword [eax + 4]
mov ecx, dword [eax + 0x18]
mov eax, dword [edx + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.004021f0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov edi, dword [esp + 0x30]
add esp, 0x10
jmp 0x4982e8
push eax
call fcn.004c6f10
add esp, 4
inc edi
mov dword [esp + 0x20], edi
dec ebp
jne 0x498250
mov ecx, dword [esp + 0x10]
and byte [ebx + 0x14], 0xfb
mov eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret