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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffff48
mov dword [esp], edx
mov esi, eax
cmp dword [esp], 0x80
jae 0x40d27e
cmp dword [esi + 0x1b4], 0
setne al
and eax, 1
jmp 0x40d853
xor edx, edx
xor ecx, ecx
mov dword [esp + 4], edx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
xor eax, eax
mov dword [esp + 8], ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x70], eax
xor edx, edx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x94], edx
mov dword [esp + 0x90], edx
mov dword [esp + 0x8c], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], edx
xor eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0x98], eax
xor ebp, ebp
xor eax, eax
mov dword [esp + 0x20], eax
xor edx, edx
mov dword [esp + 0x24], edx
jmp 0x40d4ba
mov ecx, dword [esi]
add ecx, dword [esi + 0x1a68]
add ecx, ebp
mov al, byte [ecx]
mov byte [esp + 0x28], al
mov bl, byte [ecx + 1]
sub bl, byte [esp + 0x28]
movsx ebx, bl
mov edi, ebx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
add dword [esp + 8], eax
mov al, byte [ecx + 2]
sub al, byte [ecx + 1]
movsx edi, al
test edi, edi
jle 0x40d33c
test ebx, ebx
jl 0x40d344
test edi, edi
jge 0x40d357
test ebx, ebx
jle 0x40d357
sub ebx, edi
mov dword [esp + 0x2c], ebx
mov eax, dword [esp + 0x2c]
cdq
xor eax, edx
sub eax, edx
add dword [esp + 0x14], eax
mov bl, byte [ecx + 2]
sub bl, byte [esp + 0x28]
movsx ebx, bl
mov edi, ebx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
mov edx, ebp
and edx, 1
add dword [esp + edx*4 + 0xc], eax
mov al, byte [ecx + 4]
sub al, byte [ecx + 2]
movsx edi, al
test edi, edi
jle 0x40d384
test ebx, ebx
jl 0x40d38c
test edi, edi
jge 0x40d3a4
test ebx, ebx
jle 0x40d3a4
sub ebx, edi
mov dword [esp + 0x30], ebx
mov eax, dword [esp + 0x30]
cdq
xor eax, edx
sub eax, edx
mov edx, ebp
and edx, 1
add dword [esp + edx*4 + 0x18], eax
mov bl, byte [ecx + 3]
sub bl, byte [esp + 0x28]
movsx ebx, bl
mov edi, ebx
mov eax, edi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x20]
add dword [esp + edx*4 + 0x60], eax
mov al, byte [ecx + 6]
sub al, byte [ecx + 3]
movsx edi, al
test edi, edi
jle 0x40d3d0
test ebx, ebx
jl 0x40d3d8
test edi, edi
jge 0x40d3f2
test ebx, ebx
jle 0x40d3f2
sub ebx, edi
mov dword [esp + 0x34], ebx
mov eax, dword [esp + 0x34]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x20]
add dword [esp + edx*4 + 0x8c], eax
mov al, byte [ecx + 4]
mov dl, byte [ecx + 8]
mov ebx, eax
sub dl, al
sub bl, byte [esp + 0x28]
movsx ebx, bl
movsx edi, dl
mov dword [esp + 0x38], ebx
mov eax, dword [esp + 0x38]
cdq
xor eax, edx
sub eax, edx
mov edx, ebp
and edx, 3
add dword [esp + edx*4 + 0x6c], eax
test edi, edi
jle 0x40d424
test ebx, ebx
jl 0x40d42c
test edi, edi
jge 0x40d447
test ebx, ebx
jle 0x40d447
sub ebx, edi
mov dword [esp + 0x3c], ebx
mov eax, dword [esp + 0x3c]
cdq
xor eax, edx
sub eax, edx
mov edx, ebp
and edx, 3
add dword [esp + edx*4 + 0x98], eax
mov dl, byte [ecx + 2]
xor eax, eax
xor dl, byte [ecx + 1]
mov al, byte [esp + 0x28]
shl eax, 2
and edx, 0xff
xor edx, eax
mov eax, dword [esi + edx*4 + 0xa5c]
mov dword [esi + edx*4 + 0xa5c], ebp
test eax, eax
jbe 0x40d490
cmp eax, ebp
jae 0x40d490
lea edx, [eax + 1]
sub edx, ebp
mov dl, byte [ecx + edx]
cmp dl, byte [ecx + 1]
jne 0x40d490
sub eax, ebp
mov al, byte [ecx + eax]
cmp al, byte [esp + 0x28]
jne 0x40d490
inc dword [esp + 4]
inc dword [esp + 0x20]
mov ecx, dword [esp + 0x20]
cmp ecx, 3
jne 0x40d4a3
xor eax, eax
mov dword [esp + 0x20], eax
inc dword [esp + 0x24]
mov edx, dword [esp + 0x24]
cmp edx, 0xc
jne 0x40d4b9
add ebp, 0x24
xor ecx, ecx
mov dword [esp + 0x24], ecx
inc ebp
mov eax, dword [esp]
sub eax, 9
cmp eax, ebp
ja 0x40d304
mov edx, dword [esp + 8]
mov dword [esp + 0x7c], edx
mov ecx, dword [esp + 0xc]
add ecx, dword [esp + 0x10]
mov dword [esp + 0x80], ecx
mov eax, dword [esp + 0x60]
add eax, dword [esp + 0x64]
add eax, dword [esp + 0x68]
mov dword [esp + 0x84], eax
mov edx, dword [esp + 0x6c]
add edx, dword [esp + 0x70]
add edx, dword [esp + 0x74]
add edx, dword [esp + 0x78]
mov dword [esp + 0x88], edx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0xa8], ecx
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x1c]
jae 0x40d524
mov edx, dword [esp + 0x18]
jmp 0x40d528
mov edx, dword [esp + 0x1c]
mov dword [esp + 0xac], edx
mov eax, dword [esp + 0x8c]
cmp eax, dword [esp + 0x90]
jae 0x40d548
mov ecx, dword [esp + 0x8c]
jmp 0x40d54f
mov ecx, dword [esp + 0x90]
cmp ecx, dword [esp + 0x94]
jae 0x40d57a
mov eax, dword [esp + 0x8c]
cmp eax, dword [esp + 0x90]
jae 0x40d571
mov edx, dword [esp + 0x8c]
jmp 0x40d581
mov edx, dword [esp + 0x90]
jmp 0x40d581
mov edx, dword [esp + 0x94]
mov dword [esp + 0xb0], edx
mov eax, dword [esp + 0x98]
cmp eax, dword [esp + 0x9c]
jae 0x40d5a1
mov ecx, dword [esp + 0x98]
jmp 0x40d5a8
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0xa0]
cmp eax, dword [esp + 0xa4]
jae 0x40d5c1
mov edx, dword [esp + 0xa0]
jmp 0x40d5c8
mov edx, dword [esp + 0xa4]
cmp ecx, edx
jae 0x40d5ee
mov eax, dword [esp + 0x98]
cmp eax, dword [esp + 0x9c]
jae 0x40d5e5
mov ecx, dword [esp + 0x98]
jmp 0x40d60e
mov ecx, dword [esp + 0x9c]
jmp 0x40d60e
mov eax, dword [esp + 0xa0]
cmp eax, dword [esp + 0xa4]
jae 0x40d607
mov ecx, dword [esp + 0xa0]
jmp 0x40d60e
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0xb4], ecx
xor edx, edx
mov eax, 1
mov ecx, dword [esp + eax*4 + 0x7c]
cmp ecx, dword [esp + edx*4 + 0x7c]
jae 0x40d628
mov edx, eax
inc eax
cmp eax, 4
jl 0x40d61c
mov eax, dword [esi + 0x1b0]
dec eax
cmp dword [esi + 0x1b4], 0
je 0x40d661
cmp eax, edx
je 0x40d661
mov ecx, 9
mov ebx, dword [esp + edx*4 + 0x7c]
sub ecx, dword [esi + 0x1a60]
imul ecx, dword [esp + eax*4 + 0x7c]
add ebx, ebx
lea ebx, [ebx + ebx*4]
cmp ecx, ebx
jae 0x40d661
mov edx, eax
cmp dword [esi + 0x1b4], 0
je 0x40d66e
cmp edx, eax
je 0x40d678
xor eax, eax
mov dword [esi + 0x1a60], eax
jmp 0x40d697
cmp dword [esi + 0x1a60], 5
jge 0x40d68c
mov ecx, dword [esi + 0x1a60]
add ecx, 2
jmp 0x40d691
mov ecx, 5
mov dword [esi + 0x1a60], ecx
lea eax, [edx + 1]
mov dword [esi + 0x1b0], eax
cmp dword [0x4312e0], 2
jne 0x40d6b0
mov al, 1
jmp 0x40d853
mov ecx, dword [esp + edx*4 + 0xa8]
cmp dword [esp], 0x400
je 0x40d6dc
mov eax, dword [esp + 4]
shl eax, 0xa
xor edx, edx
div dword [esp]
mov dword [esp + 4], eax
mov eax, ecx
shl eax, 0xa
xor edx, edx
div dword [esp]
mov ecx, eax
mov eax, dword [esi + 0x1b0]
imul ecx
mov dword [esp + 0x40], eax
mov edx, dword [esp + 0x40]
imul edx, ecx
imul ecx, dword [esp + 0x40], 0x32
add ecx, 0x13880
imul ecx, dword [esp + 4]
add edx, ecx
mov dword [esp + 0x44], edx
cmp dword [esi + 0x1a5c], 3
jle 0x40d715
mov ecx, 4
jmp 0x40d71c
mov ecx, dword [esi + 0x1a5c]
inc ecx
mov eax, dword [esp + 0x44]
xor edx, edx
div ecx
mov dword [esp + 0x44], eax
cmp dword [esp + 0x44], 0x3d0900
jae 0x40d851
mov eax, dword [esi + 0x1a68]
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x4c]
add edx, 2
and edx, dword [esi + 0x1c]
mov ecx, dword [esi]
xor eax, eax
mov al, byte [ecx + edx]
mov edx, dword [eax*4 + 0x432a68]
shl edx, 0xa
mov dword [esp + 0x50], edx
mov ecx, dword [esp + 0x4c]
inc ecx
and ecx, dword [esi + 0x1c]
mov eax, dword [esi]
xor edx, edx
mov dl, byte [eax + ecx]
mov ecx, dword [edx*4 + 0x432a68]
shl ecx, 4
add dword [esp + 0x50], ecx
mov eax, dword [esi + 0x1c]
and eax, dword [esp + 0x4c]
mov edx, dword [esi]
xor ecx, ecx
mov cl, byte [edx + eax]
add dword [esp + 0x50], ecx
mov eax, dword [esp + 0x50]
and eax, 0x3ffff
mov dword [esp + 0x48], eax
mov edx, dword [esi + 0x1a68]
add edx, 3
and edx, dword [esi + 0x1c]
mov ecx, dword [esi]
xor eax, eax
mov al, byte [ecx + edx]
mov edx, dword [eax*4 + 0x432a68]
shl edx, 6
add edx, dword [esp + 0x48]
and edx, 0x3ffff
mov dword [esp + 0x54], edx
mov ecx, dword [esi + 0x1a68]
add ecx, 4
and ecx, dword [esi + 0x1c]
mov eax, dword [esi]
xor edx, edx
mov dl, byte [eax + ecx]
shl edx, 8
add edx, dword [esp + 0x54]
and edx, 0x3ffff
mov dword [esp + 0x58], edx
mov ecx, dword [esi + 0x10]
mov eax, dword [esp + 0x58]
mov edx, dword [ecx + eax*4]
and edx, dword [esi + 0x1c]
mov dword [esp + 0x5c], edx
cmp dword [esp + 0x5c], 0
je 0x40d847
cmp dword [esp], 0xff
jbe 0x40d812
mov eax, 0xff
jmp 0x40d817
mov eax, 0x7d
mov ebx, dword [esp + 0x5c]
mov edx, eax
add ebx, edx
mov ecx, dword [esi + 0x1c]
and ebx, ecx
mov edi, dword [esi]
mov bl, byte [edi + ebx]
mov edi, dword [esi + 0x1a68]
add edi, edx
and edi, ecx
mov edx, dword [esi]
cmp bl, byte [edx + edi]
jne 0x40d847
test eax, eax
jne 0x40d842
xor eax, eax
jmp 0x40d853
sub eax, 5
jmp 0x40d817
inc dword [esi + 0x1a5c]
mov al, 1
jmp 0x40d853
xor eax, eax
add esp, 0xb8
pop ebp
pop edi
pop esi
pop ebx
ret