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

Disassembly:
sub esp, 0x538
mov ecx, dword [esp + 0x550]
mov eax, dword [esp + 0x554]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x548]
mov edx, dword [esi]
mov ebp, dword [esi + 0xa0]
mov byte [esi + 0x10b], 1
mov bl, byte [ecx]
test bl, bl
push edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x2c], eax
jns 0x405c78
mov eax, dword [edx + 0x104]
mov dword [esp + 0x18], eax
jmp 0x405c80
mov dword [esp + 0x18], 0
mov ecx, dword [esp + 0x18]
add ecx, 2
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x554]
movzx ax, byte [ecx]
movzx di, byte [ecx + 1]
shl eax, 8
add eax, edi
movzx di, bl
mov ebx, dword [esp + 0x560]
movzx bx, byte [ebx + 1]
and eax, 0x7fff
mov dword [esp + 0x1c], eax
shl edi, 8
add edi, ebx
mov ebx, dword [edx + 0x104]
mov dword [esp + 0x14], ebx
mov ebx, dword [esi + 0xe0]
imul ebx, ebx, 0x2c
add ebx, dword [edx + 0x140]
and edi, 0x7fff
mov edx, ebx
mov ebx, dword [esp + 0x550]
cmp edx, ebx
mov dword [esp + 0x20], edi
jne 0x405cf5
mov byte [esi + 0x10a], 1
mov edx, dword [esp + 0x564]
add eax, ecx
cmp edx, eax
mov dword [esp + 0x34], eax
jae 0x405d24
mov edx, dword [esp + 0x3c]
mov eax, dword [edx + 0x1ac]
test al, 1
lea eax, [eax + 1]
mov dword [edx + 0x1ac], eax
mov edx, dword [esp + 0x564]
jne 0x405d38
mov eax, dword [esp + 0x14]
lea eax, [eax + ecx + 2]
cmp edx, eax
mov dword [esp + 0x38], eax
jne 0x40623c
test byte [ebx + 2], 0x20
je 0x405d5e
lea eax, [esp + 0x10]
push eax
push edx
push ebp
push ecx
push ebx
push esi
call fcn.00410260
add esp, 0x18
test eax, eax
mov dword [esp + 0x2c], eax
je 0x4066da
jmp 0x405d84
mov edx, dword [esp + 0x14]
push ebp
lea ecx, [esp + 0x30]
push ecx
push edx
push ebx
mov byte [ebp + 1], 0
mov byte [ebp], 0
call dword [ebx + 0x20]
add esp, 0x10
test eax, eax
je 0x4066da
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0040e8d0
push 0
push ebp
push edx
push eax
push ebx
push esi
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], edx
call fcn.0040ddb0
add esp, 0x20
test eax, eax
je 0x4066da
movzx si, byte [ebp]
movzx cx, byte [ebp + 1]
mov edx, dword [esp + 0x2c]
lea eax, [ebp + 2]
shl esi, 8
add esi, ecx
mov ecx, dword [esp + 0x14]
push ecx
push eax
sub edx, ecx
push edx
and esi, 0x7fff
call fcn.0041cb00
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x564]
push ecx
mov ecx, dword [esp + 0x560]
lea edx, [esp + 0x2f8]
push edx
push eax
push ebx
push ecx
call fcn.004103c0
add esp, 0x24
test eax, eax
je 0x4066da
mov eax, dword [esp + 0x560]
lea edx, [esp + 0x10]
push edx
lea ecx, [edi + eax]
push ecx
lea edx, [esp + 0x88]
push edx
push eax
mov eax, dword [esp + 0x55c]
push ebx
push eax
call fcn.004103c0
add esp, 0x18
test eax, eax
je 0x4066da
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp edi, ecx
sete al
lea edx, [esp + 0x80]
add ecx, ebp
dec eax
and eax, edx
lea edx, [esp + 0x50]
push edx
lea edx, [esp + 0x2e8]
push edx
push eax
push eax
mov eax, dword [esp + 0x28]
push ecx
push eax
push ebx
call dword [ebx + 0x24]
mov edx, dword [esp + 0x40]
mov ecx, esi
sub ecx, edx
add eax, ecx
push ecx
add eax, edi
add eax, ebp
add esi, ebp
push esi
push eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x58], eax
call fcn.00419154
mov esi, dword [esp + 0x588]
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x48]
lea eax, [esp + 0x78]
push eax
add ecx, ebp
push ecx
push ebx
call dword [ebx + 0x28]
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x598]
sub eax, ebp
mov edi, dword [esp + 0x48]
mov esi, eax
mov eax, dword [esp + 0x4c]
neg eax
sbb eax, eax
and eax, 0x8000
mov dword [esp + 0x54], eax
add eax, esi
and eax, 0xffff
mov byte [ebp + 1], al
push 0
shr eax, 8
push edx
mov byte [ebp], al
lea eax, [esp + 0x320]
push eax
push ecx
push edi
push ebx
call fcn.00406710
add esp, 0x4c
test eax, eax
je 0x4066da
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x554]
sub edx, eax
mov eax, edi
neg eax
sbb eax, eax
and eax, 0x8000
mov dword [esp + 0x34], eax
add eax, edx
and eax, 0xffff
mov byte [ecx + 1], al
shr eax, 8
mov byte [ecx], al
xor eax, eax
mov ax, word [ebx + 4]
mov dword [esp + 0x1c], edx
cmp esi, eax
ja 0x405f86
mov edi, dword [esp + 0x560]
mov eax, dword [esp + 0x44]
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x54c]
push eax
push ecx
push ebx
push esi
call fcn.0040df70
add esp, 0x10
test eax, eax
jne 0x4066da
jmp 0x4061d5
mov eax, dword [esp + 0x564]
lea edi, [edi + ecx + 2]
add edx, ecx
cmp eax, edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], edi
je 0x405fc7
lea edx, [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [esp + 0x55c]
push ebx
push ecx
call fcn.004103c0
add esp, 0x18
test eax, eax
je 0x4066da
lea edx, [esp + 0x4c]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x88]
push ecx
push ebp
push ebx
push edx
call fcn.004042c0
add esp, 0x18
test eax, eax
mov dword [esp + 0x28], eax
je 0x4066da
mov edi, dword [esp + 0x560]
sub eax, ebp
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov dword [esp + 0x10], eax
mov esi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x4c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
add eax, ecx
mov ecx, dword [esp + 0x560]
and eax, 0xffff
mov byte [ecx + 1], al
shr eax, 8
mov byte [ecx], al
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
push eax
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x554]
lea eax, [esp + edx + 0x88]
push eax
push ecx
call fcn.0040ea70
mov esi, dword [esp + 0x574]
mov edx, dword [esp + 0x48]
xor eax, eax
cmp esi, edx
sete al
lea edx, [esp + 0x2f4]
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x44]
dec eax
and eax, edx
lea edx, [esp + 0x94]
push edx
push eax
push eax
xor eax, eax
cmp esi, ecx
mov ecx, dword [esp + 0x34]
sete al
dec eax
and eax, esi
push eax
push ecx
push ebx
call dword [ebx + 0x24]
mov edi, eax
mov eax, dword [esp + 0x5c]
add esp, 0x2c
test edi, edi
jl 0x4060b8
mov edx, eax
sub edx, esi
push edx
push eax
add eax, edi
push eax
call fcn.00419154
jmp 0x4060c8
sub eax, esi
add eax, edi
push eax
mov eax, esi
sub eax, edi
push eax
push esi
call fcn.0041cb00
add esp, 0xc
lea ecx, [esp + 0x50]
push ecx
push esi
push ebx
call dword [ebx + 0x28]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x560]
mov esi, dword [esp + 0x24]
add eax, edi
mov dword [esp + 0x28], eax
add eax, edx
and eax, 0xffff
mov byte [ecx + 1], al
shr eax, 8
add esp, 0xc
test esi, esi
mov byte [ecx], al
je 0x406118
mov eax, dword [esp + 0x28]
sub eax, esi
push esi
push eax
lea eax, [ebp + 2]
push eax
call fcn.0041cb00
add esp, 0xc
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
push ebx
call dword [ebx + 0x20]
add esp, 0x10
test eax, eax
je 0x4066da
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x84]
push ecx
push 0
push 0
push 0
push esi
push ebx
call dword [ebx + 0x24]
movzx dx, byte [ebp + 1]
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
mov edi, eax
movzx ax, byte [ebp]
shl eax, 8
add eax, edx
and eax, 0x7fff
sub eax, ecx
add eax, ebp
push eax
mov dword [esp + 0x30], eax
lea eax, [edi + esi]
push ecx
add eax, ebp
push eax
call fcn.0041cb00
lea ecx, [esp + 0x78]
push ecx
lea eax, [esi + ebp]
push eax
push ebx
call dword [ebx + 0x28]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x78]
lea eax, [esi + edi]
mov edi, dword [esp + 0x54]
add eax, ecx
mov ecx, dword [esp + 0x580]
add eax, edi
and eax, 0xffff
mov byte [ebp + 1], al
shr eax, 8
push ebp
push edx
mov byte [ebp], al
mov eax, dword [esp + 0x7c]
push eax
push ebx
push ecx
call fcn.0040de50
add esp, 0x48
test eax, eax
jne 0x4066da
mov esi, dword [esp + 0x54c]
mov edx, dword [esp + 0x560]
mov eax, dword [esp + 0x55c]
mov ecx, dword [esp + 0x558]
push edx
push eax
push ecx
push ebx
push esi
call fcn.0040de50
add esp, 0x14
test eax, eax
jne 0x4066da
mov al, byte [esi + 0x109]
test al, al
je 0x406222
mov edx, dword [esp + 0x1c]
pop edi
mov eax, 0x14
cmp eax, edx
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x538
ret
mov edx, dword [esp + 0x1c]
xor eax, eax
mov ax, word [ebx + 6]
pop edi
pop esi
pop ebp
pop ebx
cmp eax, edx
sbb eax, eax
inc eax
add esp, 0x538
ret
lea eax, [esp + 0x10]
push eax
push edx
lea edx, [esp + 0x2ec]
push edx
push ecx
push ebx
push esi
call fcn.004103c0
add esp, 0x18
test eax, eax
mov dword [esp + 0x564], eax
je 0x4066da
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0040e8d0
push 0
push ebp
push edx
push eax
push ebx
push esi
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], edx
call fcn.0040ddb0
add esp, 0x20
test eax, eax
je 0x4066da
movzx si, byte [ebp]
movzx cx, byte [ebp + 1]
mov edx, dword [esp + 0x560]
lea eax, [edx + 2]
shl esi, 8
add esi, ecx
mov ecx, dword [esp + 0x14]
push ecx
push eax
mov eax, dword [esp + 0x34]
sub eax, ecx
push eax
and esi, 0x7fff
call fcn.0041cb00
mov ecx, dword [esp + 0x570]
lea edx, [esp + 0x2f0]
push edx
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
push ebx
call dword [ebx + 0x20]
add esp, 0x1c
test eax, eax
je 0x4066da
mov ecx, dword [esp + 0x54c]
lea edx, [esp + 0x10]
push edx
lea eax, [esi + ebp]
push eax
lea eax, [esp + 0x88]
push eax
push ebp
push ebx
push ecx
call fcn.004103c0
add esp, 0x18
test eax, eax
je 0x4066da
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp edi, ecx
sete al
lea edx, [esp + 0x80]
dec eax
and eax, edx
cmp edi, ecx
jne 0x406333
xor ecx, ecx
jmp 0x40633c
mov edx, dword [esp + 0x560]
add ecx, edx
lea edx, [esp + 0x50]
push edx
lea edx, [esp + 0x2e8]
push edx
push eax
push eax
mov eax, dword [esp + 0x28]
push ecx
push eax
push ebx
call dword [ebx + 0x24]
mov ecx, dword [esp + 0x40]
add esp, 0x1c
test eax, eax
mov dword [esp + 0x20], eax
jl 0x40637b
mov edx, edi
sub edx, ecx
push edx
mov edx, dword [esp + 0x564]
add ecx, edx
push ecx
lea ecx, [esi + ebp]
add ecx, eax
push ecx
jmp 0x406392
mov edx, eax
sub edx, ecx
sub ecx, eax
mov eax, dword [esp + 0x560]
add edx, edi
push edx
add ecx, eax
push ecx
lea eax, [esi + ebp]
push eax
call fcn.0041cb00
add esp, 0xc
lea eax, [esp + 0x50]
push eax
lea eax, [esi + ebp]
push eax
push ebx
call dword [ebx + 0x28]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x40]
sub eax, edx
add eax, edi
mov edi, dword [esp + 0x24]
add esi, eax
neg edi
sbb edi, edi
and edi, 0x8000
lea eax, [edi + esi]
and eax, 0xffff
push 0
push ecx
mov ecx, dword [esp + 0x28]
mov byte [ebp + 1], al
shr eax, 8
lea edx, [esp + 0x2f8]
push edx
mov byte [ebp], al
mov eax, dword [esp + 0x57c]
push eax
push ecx
push ebx
call fcn.00406710
add esp, 0x24
test eax, eax
je 0x4066da
mov ecx, dword [esp + 0x1c]
sub ecx, eax
mov eax, dword [esp + 0x14]
neg eax
sbb eax, eax
and eax, 0x8000
mov dword [esp + 0x34], eax
add eax, ecx
and eax, 0xffff
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x554]
mov byte [ecx + 1], al
shr eax, 8
xor edx, edx
mov byte [ecx], al
mov dx, word [ebx + 4]
cmp esi, edx
ja 0x40646a
mov eax, dword [esp + 0x55c]
mov ecx, dword [esp + 0x558]
mov edx, dword [esp + 0x54c]
push eax
push ecx
push ebx
push edx
call fcn.0040df70
add esp, 0x10
test eax, eax
jne 0x4066da
jmp 0x4066ba
mov eax, dword [esp + 0x564]
cmp eax, dword [esp + 0x38]
jne 0x406481
mov dword [esp + 0x38], 0
jmp 0x4064b4
lea edx, [esp + 0x2e4]
mov dword [esp + 0x38], edx
lea edx, [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x2ec]
push eax
push ecx
mov ecx, dword [esp + 0x55c]
push ebx
push ecx
call fcn.004103c0
add esp, 0x18
test eax, eax
je 0x4066da
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x88]
push ecx
push ebp
push ebx
push edx
call fcn.004042c0
add esp, 0x18
test eax, eax
mov dword [esp + 0x30], eax
je 0x4066da
mov eax, dword [esp + 0x55c]
mov ecx, dword [esp + 0x558]
mov edx, dword [esp + 0x3c]
push eax
push ecx
mov ecx, dword [esp + 0x554]
lea eax, [esp + edx + 0x88]
push eax
push ecx
call fcn.0040ea70
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x564]
add eax, edx
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x94]
push edx
push ecx
push ecx
mov ecx, dword [esp + 0x584]
xor edx, edx
cmp ecx, eax
sete dl
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x34]
dec edx
and edx, ecx
push edx
push eax
push ebx
call dword [ebx + 0x24]
mov ecx, dword [esp + 0x74]
add esp, 0x2c
test eax, eax
mov dword [esp + 0x20], eax
jle 0x40656d
mov edx, ecx
sub edx, dword [esp + 0x564]
push edx
push ecx
add ecx, eax
push ecx
call fcn.00419154
jmp 0x406584
mov edx, dword [esp + 0x564]
sub ecx, edx
add ecx, eax
push ecx
mov ecx, edx
sub ecx, eax
push ecx
push edx
call fcn.0041cb00
mov eax, dword [esp + 0x570]
add esp, 0xc
lea edx, [esp + 0x50]
push edx
push eax
push ebx
call dword [ebx + 0x28]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x40]
add eax, edx
mov dword [esp + 0x28], eax
add eax, ecx
mov ecx, dword [esp + 0x560]
and eax, 0xffff
mov byte [ecx + 1], al
shr eax, 8
mov byte [ecx], al
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x4065ea
mov edx, dword [esp + 0x28]
push eax
sub edx, eax
mov eax, dword [esp + 0x564]
push edx
add eax, 2
push eax
call fcn.0041cb00
mov eax, dword [esp + 0x24]
add esp, 0xc
lea ecx, [esp + 0x80]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
push ebx
call dword [ebx + 0x20]
add esp, 0x10
test eax, eax
mov dword [esp + 0x10], eax
je 0x4066da
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x84]
push ecx
push 0
push 0
push 0
push edx
push ebx
call dword [ebx + 0x24]
mov ecx, dword [esp + 0x44]
sub esi, ecx
add esi, ebp
push esi
push ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x584]
add eax, ecx
add eax, esi
push eax
call fcn.0041cb00
mov eax, dword [esp + 0x4c]
lea edx, [esp + 0x78]
push edx
add eax, esi
push eax
push ebx
call dword [ebx + 0x28]
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
lea eax, [edx + ecx]
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x58c]
add eax, edx
mov edx, dword [esp + 0x580]
add eax, edi
and eax, 0xffff
mov byte [esi + 1], al
shr eax, 8
push esi
mov byte [esi], al
mov eax, dword [esp + 0x594]
push eax
push ecx
push ebx
push edx
call fcn.0040de50
add esp, 0x48
test eax, eax
jne 0x4066da
mov eax, dword [esp + 0x30]
sub eax, ebp
add eax, edi
and eax, 0xffff
mov byte [ebp + 1], al
shr eax, 8
mov byte [ebp], al
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x54c]
push ebp
push eax
push ecx
push ebx
push edx
call fcn.0040de50
add esp, 0x14
test eax, eax
je 0x4066e8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x538
ret
mov edx, dword [esp + 0x1c]
xor eax, eax
mov ax, word [ebx + 4]
pop edi
pop esi
pop ebp
pop ebx
shr eax, 1
cmp eax, edx
sbb eax, eax
inc eax
add esp, 0x538
ret