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

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
imul eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push ebx
push ebp
push esi
lea esi, [edx + edx*2]
add ecx, eax
mov eax, dword [esp + 0x40]
add esi, ecx
mov ecx, dword [esp + 0x30]
push edi
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x51]
lea edi, [eax + ecx]
mov eax, dword [esp + 0x40]
imul edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
add edi, eax
add edi, ecx
mov ecx, dword [esp + 0x52]
and ecx, 0xff
add edi, ebp
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x28], ecx
mov cl, byte [esp + 0x54]
and ebp, 0xff
and ebx, 0xff
cmp cl, 0xff
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
jne 0x40ce9e
mov ecx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x50]
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x48]
push eax
mov eax, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x4c]
push ecx
push edx
push eax
call fcn.0040c7f0
mov eax, dword [esp + 0x78]
add esp, 0x38
mov edx, dword [esp + 0x48]
cmp edx, 0xc
jge 0x40cf9b
mov eax, dword [esp + 0x4c]
test eax, eax
jle 0x40d3f4
mov dword [esp + 0x30], eax
test edx, edx
jle 0x40cf68
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x34], edx
and ecx, 0xff
mov dword [esp + 0x38], ecx
xor eax, eax
mov al, byte [edi]
imul eax, ecx
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40cf51
mov cl, byte [esi]
mov eax, dword [esp + 0x44]
and ecx, 0xff
mov edx, ebp
and eax, 0xff
sub edx, ecx
imul edx, eax
mov cl, byte [esi]
sar edx, 8
add dl, cl
mov byte [esi], dl
mov cl, byte [esi + 1]
inc esi
mov byte [esp + 0x4c], cl
and ecx, 0xff
mov edx, ebx
sub edx, ecx
mov cl, byte [esp + 0x4c]
imul edx, eax
sar edx, 8
add dl, cl
mov byte [esi], dl
mov cl, byte [esi + 1]
mov edx, dword [esp + 0x28]
inc esi
mov byte [esp + 0x4c], cl
and ecx, 0xff
sub edx, ecx
mov cl, byte [esp + 0x4c]
imul edx, eax
sar edx, 8
add dl, cl
mov ecx, dword [esp + 0x38]
mov byte [esi], dl
inc esi
jmp 0x40cf54
add esi, 3
mov eax, dword [esp + 0x34]
inc edi
dec eax
mov dword [esp + 0x34], eax
jne 0x40ced5
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
add esi, edi
mov edi, dword [esp + 0x14]
add edi, ecx
dec eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x30], eax
jne 0x40cebb
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cdq
xor eax, edx
mov ecx, 4
sub eax, edx
mov dword [esp + 0x44], eax
cdq
xor eax, edx
sub eax, edx
and eax, 3
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x44]
sub ecx, eax
mov eax, dword [esp + 0x48]
add eax, edx
mov dword [esp + 0x34], ecx
cdq
xor eax, edx
sub eax, edx
and eax, 3
xor eax, edx
sub eax, edx
cmp ecx, 4
mov dword [esp + 0x50], eax
jne 0x40cfe6
mov dword [esp + 0x34], 0
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x48]
sub edx, ecx
sub edx, eax
mov eax, dword [esp + 0x4c]
sar edx, 2
test eax, eax
mov dword [esp + 0x24], edx
jle 0x40d3f4
mov dword [esp + 0x40], eax
jmp 0x40d00b
mov ecx, dword [esp + 0x34]
test ecx, ecx
jle 0x40d0b2
mov edx, dword [esp + 0x54]
mov dword [esp + 0x48], ecx
and edx, 0xff
mov dword [esp + 0x38], edx
xor eax, eax
mov al, byte [edi]
imul eax, edx
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40d09f
mov al, byte [esi]
mov ecx, dword [esp + 0x44]
and eax, 0xff
mov edx, ebp
and ecx, 0xff
sub edx, eax
imul edx, ecx
mov al, byte [esi]
sar edx, 8
add dl, al
mov byte [esi], dl
mov al, byte [esi + 1]
inc esi
mov byte [esp + 0x4c], al
and eax, 0xff
mov edx, ebx
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, ecx
sar edx, 8
add dl, al
mov byte [esi], dl
mov al, byte [esi + 1]
mov edx, dword [esp + 0x28]
inc esi
mov byte [esp + 0x4c], al
and eax, 0xff
sub edx, eax
imul edx, ecx
mov cl, byte [esp + 0x4c]
sar edx, 8
add dl, cl
mov byte [esi], dl
mov edx, dword [esp + 0x38]
inc esi
jmp 0x40d0a2
add esi, 3
mov eax, dword [esp + 0x48]
inc edi
dec eax
mov dword [esp + 0x48], eax
jne 0x40d025
mov ecx, dword [esp + 0x24]
mov edx, esi
mov eax, edi
mov dword [esp + 0x30], edx
test ecx, ecx
mov dword [esp + 0x2c], eax
jle 0x40d315
add edi, 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x48], edi
lea edi, [esi + 2]
cmp dword [eax], 0
je 0x40d2e6
mov esi, dword [esp + 0x54]
xor ecx, ecx
mov cl, byte [eax]
and esi, 0xff
imul ecx, esi
shr ecx, 8
test cl, cl
mov dword [esp + 0x38], esi
mov byte [esp + 0x44], cl
je 0x40d164
mov dl, byte [edx]
mov ecx, dword [esp + 0x44]
mov esi, edx
mov eax, ebp
and esi, 0xff
and ecx, 0xff
sub eax, esi
imul eax, ecx
sar eax, 8
add al, dl
mov edx, dword [esp + 0x30]
mov byte [edx], al
mov dl, byte [edi - 1]
mov esi, edx
mov eax, ebx
and esi, 0xff
sub eax, esi
imul eax, ecx
sar eax, 8
add al, dl
mov byte [edi - 1], al
mov dl, byte [edi]
mov eax, dword [esp + 0x28]
mov esi, edx
and esi, 0xff
sub eax, esi
mov esi, dword [esp + 0x38]
imul eax, ecx
sar eax, 8
add al, dl
lea ecx, [edi + 1]
mov byte [edi], al
jmp 0x40d167
lea ecx, [edi + 1]
mov edx, dword [esp + 0x48]
xor eax, eax
mov al, byte [edx - 1]
imul eax, esi
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40d1e6
mov al, byte [ecx]
mov esi, dword [esp + 0x44]
and eax, 0xff
mov edx, ebp
and esi, 0xff
sub edx, eax
imul edx, esi
mov al, byte [ecx]
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
mov edx, ebx
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
mov edx, dword [esp + 0x28]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
mov esi, dword [esp + 0x38]
sar edx, 8
add dl, al
mov byte [ecx], dl
inc ecx
jmp 0x40d1e9
add ecx, 3
mov edx, dword [esp + 0x48]
xor eax, eax
mov al, byte [edx]
imul eax, esi
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40d267
mov al, byte [ecx]
mov esi, dword [esp + 0x44]
and eax, 0xff
mov edx, ebp
and esi, 0xff
sub edx, eax
imul edx, esi
mov al, byte [ecx]
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
mov edx, ebx
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
mov edx, dword [esp + 0x28]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
mov esi, dword [esp + 0x38]
sar edx, 8
add dl, al
mov byte [ecx], dl
inc ecx
jmp 0x40d26a
add ecx, 3
mov edx, dword [esp + 0x48]
xor eax, eax
mov al, byte [edx + 1]
imul eax, esi
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40d2e2
mov al, byte [ecx]
mov esi, dword [esp + 0x44]
and eax, 0xff
mov edx, ebp
and esi, 0xff
sub edx, eax
imul edx, esi
mov al, byte [ecx]
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
mov edx, ebx
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
mov edx, dword [esp + 0x28]
inc ecx
mov byte [esp + 0x4c], al
and eax, 0xff
sub edx, eax
mov al, byte [esp + 0x4c]
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x48]
mov ecx, dword [esp + 0x1c]
add edx, 0xc
add edi, 0xc
add eax, 4
add esi, 4
dec ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], esi
mov dword [esp + 0x1c], ecx
jne 0x40d0d8
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x50]
test eax, eax
mov ecx, edx
jle 0x40d3c9
mov esi, dword [esp + 0x54]
mov dword [esp + 0x30], eax
and esi, 0xff
mov dword [esp + 0x38], esi
mov edx, dword [esp + 0x48]
xor eax, eax
mov al, byte [edx]
imul eax, esi
shr eax, 8
test al, al
mov byte [esp + 0x44], al
je 0x40d3ae
mov al, byte [ecx]
mov esi, dword [esp + 0x44]
mov edi, eax
mov edx, ebp
and edi, 0xff
and esi, 0xff
sub edx, edi
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
inc ecx
mov edi, eax
and edi, 0xff
mov edx, ebx
sub edx, edi
imul edx, esi
sar edx, 8
add dl, al
mov byte [ecx], dl
mov al, byte [ecx + 1]
mov edx, dword [esp + 0x28]
inc ecx
mov edi, eax
and edi, 0xff
sub edx, edi
imul edx, esi
mov esi, dword [esp + 0x38]
sar edx, 8
add dl, al
mov byte [ecx], dl
inc ecx
jmp 0x40d3b1
add ecx, 3
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x30]
inc edx
dec eax
mov dword [esp + 0x48], edx
mov dword [esp + 0x30], eax
jne 0x40d339
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add esi, edx
add edi, ecx
dec eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
mov dword [esp + 0x40], eax
jne 0x40d007
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret