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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x34]
mov dword [ebx], 0
mov eax, dword [0x897544]
test eax, eax
je 0x4db4e6
mov eax, dword [fcn.008975b8]
test eax, eax
je 0x4db4e6
push 0
push 0
push 0
call dword [fcn.0089759c]
add esp, 0xc
test al, 1
je 0x4db4e6
xor eax, eax
push ebp
mov dword [esp + 0x18], eax
push esi
mov dword [esp + 0x20], eax
push edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
test edi, edi
mov dword [esp + 0x30], eax
je 0x4db20c
movsx cx, byte [edi + 0xec]
mov word [esp + 0x20], cx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x22]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x6a2d04]
push 0x668a0
mov byte [esp + 0x2f], 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], 0x668a0
call fcn.00643b70
mov ebp, dword [esp + 0x3c]
mov edi, eax
mov eax, ebp
lea ecx, [esp + 0x14]
neg eax
sbb eax, eax
push 0
push ecx
and eax, 0x1a
push edi
lea edx, [esp + 0x30]
push 0x14
add eax, 3
push edx
push eax
mov dword [esp + 0x38], edi
call dword [fcn.008975b8]
add esp, 0x1c
test eax, eax
je 0x4db285
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x4db27f
mov eax, 0xd41d41d5
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 7
mov dword [ebx], ecx
jmp 0x4db285
mov dword [ebx], 0
mov eax, dword [ebx]
cmp eax, 0xbb8
jle 0x4db293
mov eax, 0xbb8
xor ecx, ecx
mov dword [ebx], eax
test eax, eax
setle cl
dec ecx
and eax, ecx
mov dword [ebx], eax
xor ebx, ebx
test eax, eax
jle 0x4db2d9
mov edx, dword [esp + 0x44]
mov eax, edi
mov ecx, 0x23
mov esi, eax
mov edi, edx
inc ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax + 0x78]
add eax, 0x8c
mov dword [edx + 0x8c], ecx
mov ecx, dword [esp + 0x40]
add edx, 0x90
cmp ebx, dword [ecx]
jl 0x4db2ad
mov edi, dword [esp + 0x1c]
push 0x668a0
xor esi, esi
call fcn.00643b70
neg ebp
lea edx, [esp + 0x14]
push esi
sbb ebp, ebp
push edx
mov dword [esp + 0x20], eax
push eax
and ebp, 0x18
lea eax, [esp + 0x30]
push 0x14
add ebp, 4
push eax
push ebp
mov dword [esp + 0x2c], 0x668a0
call dword [fcn.008975b8]
add esp, 0x1c
test eax, eax
je 0x4db342
mov ecx, dword [esp + 0x10]
test ecx, ecx
jle 0x4db4df
mov eax, 0xd41d41d5
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 7
mov esi, ecx
cmp esi, 0xbb8
jle 0x4db342
mov esi, 0xbb8
mov ebp, dword [esp + 0x40]
xor ebx, ebx
test esi, esi
mov eax, dword [ebp]
mov dword [esp + 0x18], 0
setle bl
dec ebx
and ebx, esi
test eax, eax
jle 0x4db3f1
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x38], edi
lea edi, [ecx + 0x84]
mov dword [edi], 0
mov dword [edi - 4], 0
test ebx, ebx
jle 0x4db3cd
mov edx, dword [esp + 0x14]
mov ebp, ebx
lea esi, [edx + 0x84]
mov ecx, dword [esp + 0x38]
lea eax, [esi - 0x84]
push eax
push ecx
call fcn.004dadf0
add esp, 8
test eax, eax
je 0x4db3c0
mov edx, dword [esi]
mov ecx, dword [edi]
add ecx, edx
mov dword [edi], ecx
mov eax, dword [esi]
test eax, eax
jle 0x4db3c0
mov eax, dword [esi - 4]
mov dword [edi - 4], eax
mov ecx, dword [esi - 0xc]
mov dword [edi - 0xc], ecx
add esi, 0x8c
dec ebp
jne 0x4db38e
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x38]
mov ecx, dword [ebp]
inc eax
add esi, 0x8c
add edi, 0x90
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], esi
jl 0x4db371
mov edi, dword [0x897550]
test edi, edi
jne 0x4db41f
push 0x668a0
call fcn.00643b70
add esp, 4
mov edi, eax
mov ecx, 0x19a28
xor eax, eax
mov dword [0x897550], edi
rep stosd dword es:[edi], eax
mov edi, dword [0x897550]
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4db452
test edi, edi
je 0x4db452
lea eax, [ebx*8]
mov esi, dword [esp + 0x14]
sub eax, ebx
lea ecx, [eax + eax*4]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [0x89754c], ebx
mov edi, dword [0x897554]
test edi, edi
jne 0x4db480
push 0x69780
call fcn.00643b70
add esp, 4
mov edi, eax
mov ecx, 0x1a5e0
xor eax, eax
mov dword [0x897554], edi
rep stosd dword es:[edi], eax
mov edi, dword [0x897554]
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x4db4b0
test edi, edi
je 0x4db4b0
mov eax, dword [ebp]
mov esi, dword [esp + 0x44]
lea ecx, [eax + eax*8]
shl ecx, 4
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp]
mov dword [0x897548], ecx
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
test eax, eax
je 0x4db4c4
push eax
call fcn.00643cfc
add esp, 4
mov eax, dword [esp + 8]
test eax, eax
je 0x4db4d5
push eax
call fcn.00643cfc
add esp, 4
mov eax, 1
pop ebx
add esp, 0x24
ret
xor esi, esi
jmp 0x4db342
xor eax, eax
pop ebx
add esp, 0x24
ret