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

Disassembly:
sub esp, 0x9c
push ebx
mov ebx, dword [esp + 0xa8]
mov eax, edx
mov dword [esp + 0x9c], eax
push ebp
mov ebp, ecx
push esi
push edi
cmp ebx, 0xa
jae 0x403071
mov eax, 0xffffffec
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret
mov edi, dword [esp + 0xb8]
add eax, ebp
mov esi, dword [esp + 0xb0]
mov dword [esp + 0x94], eax
add eax, 0xfffffffd
mov dword [esp + 0x20], eax
lea ecx, [edi + 4]
mov dword [esp + 0x14], ecx
mov ecx, esi
call fcn.00401080
movzx eax, ax
lea ecx, [esi + 2]
mov dword [esp + 0x3c], eax
call fcn.00401080
movzx eax, ax
lea ecx, [esi + 4]
mov dword [esp + 0x2c], eax
call fcn.00401080
movzx ecx, ax
lea eax, [esi + 6]
mov dword [esp + 0x98], eax
sub ebx, ecx
add eax, dword [esp + 0x3c]
sub ebx, dword [esp + 0x2c]
sub ebx, dword [esp + 0x3c]
mov dword [esp + 0x10], eax
sub ebx, 6
add eax, dword [esp + 0x2c]
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xa8]
add eax, 3
mov dword [esp + 0xa0], ecx
shr eax, 2
mov dword [esp + 0x9c], ebx
mov dword [esp + 0x24], 1
lea ecx, [eax + ebp]
lea edx, [ecx + eax]
mov dword [esp + 0x40], ecx
add eax, edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
mov esi, eax
mov dword [esp + 0x1c], eax
mov ebx, edx
mov eax, dword [edi]
shr eax, 0x10
movzx edi, al
mov eax, dword [esp + 0xb4]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x18], edi
cmp dword [esp + 0x9c], eax
ja 0x403061
push dword [esp + 0x3c]
mov edx, dword [esp + 0x9c]
lea ecx, [esp + 0x48]
call fcn.00401090
add esp, 4
cmp eax, 0xffffff88
ja 0x403a39
push dword [esp + 0x2c]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x5c]
call fcn.00401090
add esp, 4
cmp eax, 0xffffff88
ja 0x403a39
push dword [esp + 0xa0]
mov edx, dword [esp + 0xa8]
lea ecx, [esp + 0x70]
call fcn.00401090
add esp, 4
cmp eax, 0xffffff88
ja 0x403a39
mov eax, dword [esp + 0xa0]
lea ecx, [esp + 0x80]
mov edx, dword [esp + 0xa4]
push dword [esp + 0x9c]
lea edx, [edx + eax]
call fcn.00401090
add esp, 4
cmp eax, 0xffffff88
ja 0x403a39
mov ecx, esi
cmp ecx, dword [esp + 0x20]
jae 0x4033e5
mov ebx, edi
mov eax, edi
neg ebx
neg eax
and ebx, 0x1f
and eax, 0x1f
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x48]
mov edi, dword [esp + 0x14]
and ecx, 0x1f
mov eax, dword [esp + 0x44]
shl eax, cl
mov ecx, ebx
shr eax, cl
movzx ecx, byte [edi + eax*2 + 1]
add ecx, dword [esp + 0x48]
movzx eax, byte [edi + eax*2]
mov byte [ebp], al
inc ebp
mov eax, dword [esp + 0x58]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x5c]
and ecx, 0x1f
mov dword [esp + 0x2c], ebp
shl eax, cl
mov ecx, ebx
shr eax, cl
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x10]
movzx ebp, byte [edi + eax*2 + 1]
movzx eax, byte [edi + eax*2]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x70]
and ecx, 0x1f
add ebp, dword [esp + 0x5c]
shl eax, cl
mov ecx, ebx
shr eax, cl
mov ecx, dword [esp + 0x38]
movzx ebx, byte [edi + eax*2 + 1]
movzx eax, byte [edi + eax*2]
mov byte [ecx], al
inc ecx
mov eax, dword [esp + 0x80]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x84]
and ecx, 0x1f
add ebx, dword [esp + 0x70]
shl eax, cl
mov ecx, dword [esp + 0x3c]
shr eax, cl
mov ecx, dword [esp + 0x14]
movzx edi, byte [edi + eax*2 + 1]
movzx eax, byte [ecx + eax*2]
mov ecx, edx
mov byte [esi], al
and ecx, 0x1f
mov eax, dword [esp + 0x44]
shl eax, cl
mov ecx, dword [esp + 0x3c]
shr eax, cl
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
add edi, dword [esp + 0x84]
movzx eax, byte [ecx + eax*2 + 1]
add eax, edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x10]
movzx eax, byte [ecx + eax*2]
mov ecx, dword [esp + 0x2c]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x2c], ecx
mov ecx, ebp
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x1c]
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add eax, ebp
mov ebp, ecx
mov dword [esp + 0x5c], eax
movzx eax, byte [ebp + edx*2]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x6c]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x30], ecx
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x1c]
shr edx, cl
mov ecx, dword [esp + 0x38]
movzx eax, byte [ebp + edx*2 + 1]
add eax, ebx
mov dword [esp + 0x70], eax
movzx eax, byte [ebp + edx*2]
mov edx, dword [esp + 0x80]
mov byte [ecx], al
inc ecx
mov dword [esp + 0x38], ecx
mov ecx, edi
and ecx, 0x1f
shl edx, cl
mov ecx, dword [esp + 0x1c]
shr edx, cl
lea ecx, [esp + 0x44]
movzx eax, byte [ebp + edx*2 + 1]
add eax, edi
mov dword [esp + 0x84], eax
movzx eax, byte [ebp + edx*2]
mov byte [esi + 1], al
add esi, 2
call fcn.004011f0
xor edi, edi
lea ecx, [esp + 0x58]
test eax, eax
cmove edi, dword [esp + 0x24]
call fcn.004011f0
neg eax
lea ecx, [esp + 0x6c]
sbb ebx, ebx
inc ebx
and ebx, edi
call fcn.004011f0
xor ebp, ebp
lea ecx, [esp + 0x80]
test eax, eax
cmove ebp, ebx
call fcn.004011f0
mov ebx, dword [esp + 0x3c]
neg eax
sbb eax, eax
inc eax
and ebp, eax
cmp esi, dword [esp + 0x20]
mov dword [esp + 0x24], ebp
sbb eax, eax
test ebp, eax
mov ebp, dword [esp + 0x2c]
jne 0x403201
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x40]
cmp ebp, eax
ja 0x403061
mov edx, dword [esp + 0x34]
cmp dword [esp + 0x30], edx
ja 0x403061
cmp ebx, ecx
ja 0x403061
lea ebx, [eax - 3]
lea ecx, [esp + 0x44]
mov dword [esp + 0x10], ebx
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x40349a
mov esi, dword [esp + 0x14]
neg edi
and edi, 0x1f
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, edi
shr eax, cl
movzx edi, byte [esi + eax*2 + 1]
add edi, dword [esp + 0x48]
movzx eax, byte [esi + eax*2]
mov ecx, edi
and ecx, 0x1f
mov byte [ebp], al
shl ebx, cl
mov ecx, dword [esp + 0x20]
shr ebx, cl
lea ecx, [esp + 0x44]
movzx eax, byte [esi + ebx*2 + 1]
add eax, edi
mov dword [esp + 0x48], eax
movzx eax, byte [esi + ebx*2]
mov byte [ebp + 1], al
add ebp, 2
call fcn.00401220
mov edi, dword [esp + 0x20]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x10]
sbb eax, eax
neg eax
test eax, ecx
jne 0x403433
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x44]
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x40]
sbb eax, eax
neg eax
test eax, ecx
je 0x403515
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
neg eax
mov ebx, dword [esp + 0x40]
and eax, 0x1f
mov dword [esp + 0x10], eax
nop dword [eax]
mov edi, dword [esp + 0x48]
mov ecx, edi
mov edx, dword [esp + 0x44]
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
lea ecx, [esp + 0x44]
movzx eax, byte [esi + edx*2 + 1]
add edi, eax
mov al, byte [esi + edx*2]
mov byte [ebp], al
inc ebp
mov dword [esp + 0x48], edi
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, ebx
sbb eax, eax
neg eax
test eax, ecx
mov eax, dword [esp + 0x10]
jne 0x4034d0
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
cmp ebp, dword [esp + 0x40]
jae 0x403567
mov esi, dword [esp + 0x48]
mov eax, ebx
mov ebx, dword [esp + 0x40]
neg eax
and eax, 0x1f
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x44]
mov ecx, esi
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add esi, eax
mov al, byte [edi + edx*2]
mov byte [ebp], al
inc ebp
mov eax, dword [esp + 0x10]
cmp ebp, ebx
jb 0x403536
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x58]
add eax, 0xfffffffd
mov dword [esp + 0x20], eax
call fcn.00401220
mov ebp, dword [esp + 0x30]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x20]
sbb eax, eax
neg eax
test eax, ecx
je 0x40360d
mov esi, ebx
neg esi
and esi, 0x1f
mov dword [esp + 0x24], esi
nop
mov ecx, dword [esp + 0x5c]
mov ebx, dword [esp + 0x58]
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, esi
mov esi, dword [esp + 0x14]
shr eax, cl
movzx edi, byte [edi + eax*2 + 1]
add edi, dword [esp + 0x5c]
movzx eax, byte [esi + eax*2]
mov ecx, edi
and ecx, 0x1f
mov byte [ebp], al
shl ebx, cl
mov ecx, dword [esp + 0x24]
shr ebx, cl
lea ecx, [esp + 0x58]
movzx eax, byte [esi + ebx*2 + 1]
add eax, edi
mov edi, esi
mov dword [esp + 0x5c], eax
movzx eax, byte [edi + ebx*2]
mov byte [ebp + 1], al
add ebp, 2
call fcn.00401220
mov esi, dword [esp + 0x24]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x20]
sbb eax, eax
neg eax
test eax, ecx
jne 0x4035a0
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x58]
call fcn.00401220
mov ebx, dword [esp + 0x18]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x34]
sbb eax, eax
neg eax
test eax, ecx
je 0x40367f
mov esi, dword [esp + 0x34]
neg ebx
and ebx, 0x1f
mov edi, dword [esp + 0x5c]
mov ecx, edi
mov edx, dword [esp + 0x58]
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add edi, eax
mov dword [esp + 0x5c], edi
mov edi, ecx
lea ecx, [esp + 0x58]
mov al, byte [edi + edx*2]
mov byte [ebp], al
inc ebp
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, esi
sbb eax, eax
neg eax
test eax, ecx
jne 0x403634
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
cmp ebp, dword [esp + 0x34]
jae 0x4036d1
mov esi, dword [esp + 0x5c]
mov eax, ebx
mov ebx, dword [esp + 0x34]
neg eax
and eax, 0x1f
mov dword [esp + 0x10], eax
nop dword [eax + eax]
mov edx, dword [esp + 0x58]
mov ecx, esi
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add esi, eax
mov al, byte [edi + edx*2]
mov byte [ebp], al
inc ebp
mov eax, dword [esp + 0x10]
cmp ebp, ebx
jb 0x4036a0
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x5c], esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x6c]
add eax, 0xfffffffd
mov dword [esp + 0x20], eax
call fcn.00401220
mov ebp, dword [esp + 0x38]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x20]
sbb eax, eax
neg eax
test eax, ecx
je 0x40377d
mov esi, ebx
neg esi
and esi, 0x1f
mov dword [esp + 0x24], esi
nop dword [eax]
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x6c]
and ecx, 0x1f
mov eax, ebx
shl eax, cl
mov ecx, esi
mov esi, dword [esp + 0x14]
shr eax, cl
movzx edi, byte [edi + eax*2 + 1]
add edi, dword [esp + 0x70]
movzx eax, byte [esi + eax*2]
mov ecx, edi
and ecx, 0x1f
mov byte [ebp], al
shl ebx, cl
mov ecx, dword [esp + 0x24]
shr ebx, cl
lea ecx, [esp + 0x6c]
movzx eax, byte [esi + ebx*2 + 1]
add eax, edi
mov edi, esi
mov dword [esp + 0x70], eax
movzx eax, byte [edi + ebx*2]
mov byte [ebp + 1], al
add ebp, 2
call fcn.00401220
mov esi, dword [esp + 0x24]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x20]
sbb eax, eax
neg eax
test eax, ecx
jne 0x403710
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x6c]
call fcn.00401220
mov ebx, dword [esp + 0x18]
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, dword [esp + 0x28]
sbb eax, eax
neg eax
test eax, ecx
je 0x4037ef
mov esi, dword [esp + 0x28]
neg ebx
and ebx, 0x1f
mov edi, dword [esp + 0x70]
mov ecx, edi
mov edx, dword [esp + 0x6c]
and ecx, 0x1f
shl edx, cl
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add edi, eax
mov dword [esp + 0x70], edi
mov edi, ecx
lea ecx, [esp + 0x6c]
mov al, byte [edi + edx*2]
mov byte [ebp], al
inc ebp
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp ebp, esi
sbb eax, eax
neg eax
test eax, ecx
jne 0x4037a4
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
cmp ebp, dword [esp + 0x28]
jae 0x40383d
mov esi, dword [esp + 0x28]
mov eax, ebx
mov ebx, dword [esp + 0x70]
neg eax
and eax, 0x1f
mov dword [esp + 0x10], eax
nop dword [eax + eax]
mov edx, dword [esp + 0x6c]
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, eax
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add ebx, eax
mov al, byte [edi + edx*2]
mov byte [ebp], al
inc ebp
mov eax, dword [esp + 0x10]
cmp ebp, esi
jb 0x403810
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x70], ebx
mov ebx, dword [esp + 0x94]
lea ecx, [esp + 0x80]
lea ebp, [ebx - 3]
mov dword [esp + 0x98], ebp
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp esi, ebp
sbb eax, eax
neg eax
test eax, ecx
je 0x4038fb
mov eax, dword [esp + 0x18]
neg eax
and eax, 0x1f
mov ebp, eax
nop dword [eax + eax]
mov ecx, dword [esp + 0x84]
mov ebx, dword [esp + 0x80]
and ecx, 0x1f
mov edx, dword [esp + 0x14]
mov eax, ebx
shl eax, cl
mov ecx, ebp
shr eax, cl
movzx edi, byte [edi + eax*2 + 1]
add edi, dword [esp + 0x84]
movzx eax, byte [edx + eax*2]
mov ecx, edi
and ecx, 0x1f
mov byte [esi], al
shl ebx, cl
mov ecx, ebp
shr ebx, cl
lea ecx, [esp + 0x80]
movzx eax, byte [edx + ebx*2 + 1]
add eax, edi
mov edi, edx
mov dword [esp + 0x84], eax
movzx eax, byte [edi + ebx*2]
mov byte [esi + 1], al
add esi, 2
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp esi, dword [esp + 0x98]
sbb eax, eax
neg eax
test eax, ecx
jne 0x403880
mov ebx, dword [esp + 0x94]
mov ebp, dword [esp + 0x18]
lea ecx, [esp + 0x80]
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp esi, ebx
sbb eax, eax
neg eax
test eax, ecx
je 0x403982
mov dword [esp + 0x10], ebp
neg ebp
and ebp, 0x1f
nop dword [eax]
nop word [eax + eax]
mov edi, dword [esp + 0x84]
mov ecx, edi
mov edx, dword [esp + 0x80]
and ecx, 0x1f
shl edx, cl
mov ecx, ebp
shr edx, cl
mov ecx, dword [esp + 0x14]
movzx eax, byte [ecx + edx*2 + 1]
add edi, eax
mov dword [esp + 0x84], edi
mov edi, ecx
lea ecx, [esp + 0x80]
mov al, byte [edi + edx*2]
mov byte [esi], al
inc esi
call fcn.00401220
neg eax
sbb ecx, ecx
inc ecx
cmp esi, ebx
sbb eax, eax
neg eax
test eax, ecx
jne 0x403930
mov ebp, dword [esp + 0x18]
cmp esi, ebx
mov ebx, dword [esp + 0x84]
jae 0x4039ba
neg ebp
and ebp, 0x1f
mov edx, dword [esp + 0x80]
mov ecx, ebx
and ecx, 0x1f
shl edx, cl
mov ecx, ebp
shr edx, cl
movzx eax, byte [edi + edx*2 + 1]
add ebx, eax
mov al, byte [edi + edx*2]
mov byte [esi], al
inc esi
cmp esi, dword [esp + 0x94]
jb 0x403992
mov eax, dword [esp + 0x4c]
cmp eax, dword [esp + 0x50]
jne 0x4039d2
cmp dword [esp + 0x48], 0x20
jne 0x4039d2
mov edx, 1
jmp 0x4039d4
xor edx, edx
mov eax, dword [esp + 0x60]
cmp eax, dword [esp + 0x64]
jne 0x4039ec
cmp dword [esp + 0x5c], 0x20
jne 0x4039ec
mov esi, 1
jmp 0x4039ee
xor esi, esi
mov eax, dword [esp + 0x74]
cmp eax, dword [esp + 0x78]
jne 0x403a06
cmp dword [esp + 0x70], 0x20
jne 0x403a06
mov ecx, 1
jmp 0x403a08
xor ecx, ecx
mov eax, dword [esp + 0x88]
cmp eax, dword [esp + 0x8c]
jne 0x403a22
cmp ebx, 0x20
jne 0x403a22
lea eax, [ebx - 0x1f]
jmp 0x403a24
xor eax, eax
and eax, ecx
mov ecx, 0xffffffec
and eax, esi
test edx, eax
mov eax, dword [esp + 0xa8]
cmove eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret