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

Disassembly:
sub esp, 0x20
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov eax, ecx
push ebx
shl eax, 4
add edx, eax
push ebp
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x2c]
push esi
shl ecx, 5
add ebp, eax
push edi
mov esi, dword [ecx + edx + 0x6c]
lea ecx, [ecx + edx + 0x6c]
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0x44]
mov eax, esi
mov edi, dword [ecx + 8]
imul eax, ebp
add eax, edi
mov edi, dword [edx + 0xd2cc]
mov edx, dword [edx + 0xd2c8]
mov dword [esp + 0x1c], esi
lea edi, [edi + eax*4]
add edx, eax
xor eax, eax
mov dword [esp + 0x44], edi
test ebp, ebp
setg al
mov edi, eax
mov eax, dword [esp + 0x48]
xor ebx, ebx
cmp eax, dword [ecx + 4]
mov dword [esp + 0x24], edi
mov dword [esp + 0x40], edx
setl bl
mov ecx, ebx
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x28], ecx
sub ecx, edi
sub ecx, ebp
add ecx, eax
xor eax, eax
imul ecx, esi
neg edi
and edi, esi
shl ecx, 2
lea edi, [ebx + edi*4]
mov ebx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x3c]
lea eax, [ecx + ebp*2]
mov ecx, dword [esp + 0x38]
mov ebp, dword [edi + 8]
mov ebx, dword [ecx + 8]
mov edi, dword [ecx + 0xc]
shl eax, 2
mov dword [esp + 0x10], ebx
imul ebx, eax
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], ebp
imul ebp, eax
add ebx, edi
mov edi, dword [ecx + 0xc]
mov ecx, dword [esp + 0x38]
add ebp, edi
cmp eax, 4
mov dword [esp + 0x3c], ebp
mov ecx, dword [ecx]
mov dword [esp + 0x14], ecx
jge 0x804d71
mov ecx, 4
sub ecx, eax
mov dword [esp + 0x3c], ecx
add eax, ecx
mov ecx, dword [esp + 0x14]
mov esi, ebp
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x18]
and ecx, 3
add ebp, edx
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
add ebx, esi
dec ecx
mov dword [esp + 0x3c], ecx
jne 0x804d38
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x3c], ebp
mov edi, dword [esp + 0x28]
xor ecx, ecx
test edi, edi
mov edi, dword [esp + 0x48]
sete cl
sub edi, ecx
shl edi, 3
mov ecx, edi
cmp eax, ecx
jge 0x804eef
sub ecx, eax
add ecx, 7
shr ecx, 3
mov dword [esp + 0x24], ecx
lea eax, [eax + ecx*8]
mov dword [esp + 0x2c], eax
jmp 0x804db0
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x1c]
xor ecx, ecx
mov cl, byte [edx]
mov edx, dword [esp + 0x34]
mov eax, dword [edx + ecx*4 + 0xd0c8]
mov ecx, dword [esp + 0x44]
lea edx, [ecx + esi*4]
push edx
push ecx
lea ecx, [eax + eax*2]
mov edx, ebp
sar ecx, 2
push ecx
push eax
mov eax, dword [esp + 0x28]
push eax
sub edx, eax
mov eax, dword [esp + 0x24]
push edx
push eax
push ebx
call fcn.00805090
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x34]
add esp, 0x20
add eax, 4
mov esi, 8
inc edx
cmp ecx, esi
mov dword [esp + 0x44], eax
mov dword [esp + 0x40], edx
jle 0x804ec1
mov edx, dword [esp + 0x1c]
lea ecx, [eax - 4]
mov dword [esp + 0x20], ecx
lea eax, [eax + edx*4]
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
xor ecx, ecx
mov cl, byte [edx]
mov edx, dword [esp + 0x44]
mov edi, dword [eax + ecx*4 + 0xd0c8]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x18]
push ecx
lea ebp, [edi + edi*2]
push edx
sar ebp, 2
mov edx, dword [esp + 0x18]
push ebp
mov ecx, esi
push edi
push eax
sub ecx, eax
mov eax, dword [esp + 0x50]
add ecx, eax
lea eax, [esi + ebx]
push ecx
push edx
push eax
call fcn.00805090
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x30]
push ecx
push ebp
push edi
push eax
mov edx, esi
shl eax, 2
sub edx, eax
lea eax, [edx + ebx - 4]
push eax
call fcn.00805330
mov ecx, dword [esp + 0x78]
mov ebp, dword [esp + 0x7c]
mov edi, dword [esp + 0x54]
mov edx, dword [esp + 0x74]
mov eax, 4
add esp, 0x34
add ecx, eax
add ebp, eax
add edi, eax
mov eax, dword [esp + 0x14]
add esi, 8
inc edx
cmp esi, eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x20], edi
mov dword [esp + 0x40], edx
jl 0x804e1f
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
lea eax, [ebp + edx*8]
lea ebx, [ebx + ecx*8]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jne 0x804da4
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x804fa3
mov ecx, dword [esp + 0x38]
mov ecx, dword [ecx + 4]
cmp eax, ecx
jge 0x804f39
sub ecx, eax
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x14]
mov esi, ebp
mov eax, ecx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x38]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
add ebx, esi
add ebp, ecx
dec eax
mov dword [esp + 0x38], eax
jne 0x804f0c
mov eax, dword [esp + 0x14]
mov esi, 8
inc edx
cmp eax, esi
jle 0x804fa3
mov ecx, dword [esp + 0x10]
lea edi, [ecx*8]
jmp 0x804f58
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x34]
xor eax, eax
mov al, byte [edx]
inc edx
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x44]
mov eax, dword [ecx + eax*4 + 0xd0c8]
mov ecx, edx
add edx, 4
push ecx
mov dword [esp + 0x48], edx
lea edx, [eax + eax*2]
sar edx, 2
mov ecx, esi
push edx
sub ecx, edi
push eax
mov eax, dword [esp + 0x1c]
lea edx, [ecx + ebx - 4]
push eax
push edx
call fcn.00805330
mov eax, dword [esp + 0x28]
add esi, 8
add esp, 0x14
cmp esi, eax
jl 0x804f54
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret