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

Disassembly:
sub esp, 0xbc
test byte [esp + 0xe0], 0x40
jne 0x405823
push ebx
mov ebx, dword [esp + 0xc4]
push esi
push edi
mov edi, dword [esp + 0xd8]
mov eax, dword [ebx + 0x10]
mov eax, dword [eax]
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x40]
push eax
push dword [esp + 0xd8]
push dword [esp + 0xe4]
push edi
call fcn.00404ac0
cmp dword [esp + 0x94], 0xffffffff
lea esi, [edi + eax]
mov dword [esp + 0x30], esi
jne 0x405815
cmp dword [esp + 0x98], 0xffffffff
jne 0x405815
mov edx, dword [esp + 0xec]
mov eax, edx
shr eax, 1
not al
and eax, 0xffffff01
cmp byte [esp + 0x60], 0
push ebp
mov ebp, dword [esp + 0xf8]
mov dword [esp + 0x30], eax
je 0x4054a5
mov ecx, dword [esp + 0xd8]
mov eax, ecx
test ecx, ecx
je 0x4051cf
test dl, 1
jne 0x4051cf
lea eax, [ecx - 1]
lea edx, [esp + 0x44]
push edx
push ecx
push eax
push esi
mov eax, edx
push eax
call fcn.00407600
push eax
call fcn.004070b0
cmp byte [esp + 0x30], 0
mov edx, eax
mov eax, dword [esp + 0xc0]
mov ecx, dword [esp + 0xbc]
mov dword [esp + 0x24], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xc4]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x1c], eax
je 0x405432
test byte [esp + 0xf0], 1
mov edi, dword [esp + 0xa8]
mov eax, dword [esp + 0xa4]
je 0x40529a
test al, 1
je 0x40525d
mov eax, edi
and eax, 1
push eax
push dword [ebx]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 2
je 0x40527b
mov eax, edi
shr eax, 1
and eax, 1
push eax
push dword [ebx + 4]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 4
je 0x40529a
mov eax, edi
shr eax, 2
and eax, 1
push eax
push dword [ebx + 8]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 8
je 0x4052b9
mov eax, edi
shr eax, 3
and eax, 1
push eax
push dword [ebx + 0xc]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 0x20
je 0x4052d8
mov eax, edi
shr eax, 5
and eax, 1
push eax
push dword [ebx + 0x10]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 0x40
je 0x4052f7
mov eax, edi
shr eax, 6
and eax, 1
push eax
push dword [ebx + 0x14]
push ebp
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, al
jns 0x40530d
shr edi, 7
and edi, 1
push edi
push dword [ebx + 0x18]
push ebp
call dword [esp + 0x100]
cmp byte [esp + 0x62], 0
jne 0x405321
mov ebx, dword [esp + 0x10]
add ebx, 0xfffffffc
add ebx, dword [esp + 0x18]
jmp 0x405373
cmp byte [esp + 0xe8], 0
je 0x405348
push dword [esp + 0xd8]
lea eax, [esp + 0x48]
push esi
push eax
call fcn.00405ac0
mov ebx, dword [esp + 0x10]
add ebx, 0xfffffffc
add ebx, eax
jmp 0x405373
cmp byte [esp + 0x66], 0
je 0x40536b
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x28]
lea eax, [eax*4 + 4]
sub ecx, eax
mov eax, dword [ecx]
add eax, 0xfffffffc
mov dword [esp + 0x20], eax
jmp 0x405377
mov ebx, dword [esp + 0x28]
sub ebx, dword [esp + 0x4c]
mov dword [esp + 0x20], ebx
lea eax, [esp + 0x34]
push eax
call fcn.00406a10
test eax, eax
jne 0x405454
mov edx, dword [esp + 0x14]
lea edi, [eax + 1]
xor ebx, ebx
xor ebp, ebp
mov eax, edx
or eax, dword [esp + 0x24]
je 0x405454
cmp ebp, 0x100
jae 0x405454
mov ecx, edi
mov eax, ebx
and eax, dword [esp + 0x24]
and ecx, edx
or ecx, eax
je 0x405424
mov eax, dword [esp + 0x20]
mov ecx, ebx
sub eax, ebp
not ecx
and dword [esp + 0x24], ecx
mov dword [esp + 0x34], eax
mov eax, edi
not eax
mov dword [esp + 0x40], ecx
and edx, eax
mov dword [esp + 0x3c], eax
mov ecx, edi
mov dword [esp + 0x14], edx
and ecx, dword [esp + 0x2c]
mov eax, ebx
and eax, dword [esp + 0x1c]
xor edx, edx
or ecx, eax
je 0x40540d
mov eax, dword [esp + 0x2c]
mov edx, 1
and eax, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
and eax, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
push edx
push dword [esp + 0x38]
push dword [esp + 0x100]
call dword [esp + 0x100]
mov edx, dword [esp + 0x14]
shld ebx, edi, 1
add ebp, 4
add edi, edi
jmp 0x405394
mov eax, dword [esp + 0xa0]
cmp eax, 8
je 0x40569d
push eax
push ebx
call fcn.004069b0
push 0
push eax
push ebp
call dword [esp + 0x100]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
cmp byte [esp + 0x62], 0
mov eax, dword [esp + 0x28]
jne 0x40546a
lea eax, [edx + ebx]
cmp byte [esp + 0xec], 0
mov dword [esp + 0x14], eax
jne 0x40571b
mov ebp, dword [esp + 0x78]
xor edi, edi
test ebp, ebp
je 0x40571b
nop word [eax + eax]
mov bl, byte [esi]
dec ebp
inc esi
test bl, 0xc0
jne 0x4056a6
movzx eax, bl
jmp 0x4056cc
lea eax, [esp + 0x44]
push eax
push dword [esp + 0xdc]
push esi
push eax
call fcn.00407600
push eax
call fcn.00406a30
cmp byte [esp + 0x30], 0
mov edx, eax
mov eax, dword [esp + 0xc4]
mov ebp, dword [esp + 0xbc]
mov ebx, dword [esp + 0xc0]
mov edi, dword [esp + 0xb0]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
je 0x405675
test byte [esp + 0xa4], 0x80
mov eax, dword [esp + 0xa8]
je 0x405531
shr eax, 7
and eax, 1
push eax
mov eax, dword [esp + 0xd4]
push dword [eax + 0x18]
push dword [esp + 0x100]
call dword [esp + 0x100]
mov eax, dword [esp + 0xa8]
test byte [esp + 0xa4], 0x40
je 0x40555a
shr eax, 6
and eax, 1
push eax
mov eax, dword [esp + 0xd4]
push dword [eax + 0x14]
push dword [esp + 0x100]
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 8
je 0x405592
mov eax, dword [esp + 0xa8]
shr eax, 3
and eax, 1
push eax
mov eax, dword [esp + 0xd4]
push dword [eax + 0xc]
push dword [esp + 0x100]
call dword [esp + 0x100]
mov eax, dword [esp + 0xa4]
test al, 0x20
je 0x4055bc
mov eax, dword [esp + 0xa8]
shr eax, 5
and eax, 1
push eax
mov eax, dword [esp + 0xd4]
push dword [eax + 0x10]
push dword [esp + 0x100]
call dword [esp + 0x100]
test edi, edi
je 0x405615
mov ebp, dword [esp + 0xf8]
mov esi, dword [esp + 0xac]
mov ebx, dword [esp + 0x10]
mov al, byte [edi]
inc edi
movzx edx, al
test al, al
jns 0x4055f2
and edx, 0x7f
nop
mov cl, byte [edi]
inc edi
movzx eax, cl
and eax, 0x7f
shl edx, 7
add edx, eax
test cl, cl
js 0x4055e0
mov ecx, edx
and edx, 0xfffffffc
and ecx, 3
push ecx
lea eax, [edx + ebx]
push eax
push ebp
call dword [esp + 0x100]
sub esi, 1
jne 0x4055d2
mov esi, dword [esp + 0x34]
jmp 0x405458
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0xc4]
mov eax, ebp
or eax, ebx
je 0x405454
mov eax, ebp
and eax, 1
or eax, 0
je 0x405658
mov eax, ecx
xor edx, edx
and eax, 1
or eax, edx
je 0x405644
mov edx, 1
push edx
push edi
push dword [esp + 0x100]
call dword [esp + 0x100]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
shrd ecx, eax, 1
shrd ebp, ebx, 1
shr eax, 1
shr ebx, 1
add edi, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
jmp 0x405620
mov eax, dword [esp + 0xa0]
cmp eax, 8
je 0x40569d
push eax
push dword [esp + 0xd4]
call fcn.004069b0
push 0
push eax
push dword [esp + 0x100]
jmp 0x40544d
mov ebx, dword [esp + 0x10]
jmp 0x40545c
movzx edx, bl
and edx, 0x3f
test bl, bl
jns 0x4056c2
mov cl, byte [esi]
inc esi
movzx eax, cl
and eax, 0x7f
shl edx, 7
add edx, eax
test cl, cl
js 0x4056b0
mov eax, edx
neg eax
test bl, 0x40
cmove eax, edx
mov ebx, dword [esp + 0x14]
sub edi, eax
mov ecx, edi
mov dword [esp + 0x1c], edi
mov edx, ecx
and ecx, 0xfffffffc
and edx, 3
add ebx, ecx
cmp byte [esp + 0x63], 0
je 0x405703
mov edi, dword [esp + 0x4c]
lea eax, [edi - 4]
cmp ecx, eax
jl 0x4056ff
mov ebx, dword [esp + 0x28]
sub ecx, edi
add ebx, 4
add ebx, ecx
mov edi, dword [esp + 0x1c]
push edx
push ebx
push dword [esp + 0x100]
call dword [esp + 0x100]
test ebp, ebp
jne 0x405490
cmp byte [esp + 0x30], 0
mov ebp, dword [esp + 0x7c]
je 0x405744
mov edx, dword [esp + 0xd8]
test byte [esp + 0xf0], 1
lea eax, [edx - 1]
cmove edx, eax
mov dword [esp + 0xd8], edx
jmp 0x405752
mov eax, dword [esp + 0xd8]
mov dword [esp + 0xd8], eax
xor ebx, ebx
test ebp, ebp
je 0x405806
nop dword [eax]
mov al, byte [esi]
dec ebp
inc esi
movzx edx, al
test al, al
jns 0x405782
and edx, 0x7f
nop
mov cl, byte [esi]
inc esi
movzx eax, cl
and eax, 0x7f
shl edx, 7
add edx, eax
test cl, cl
js 0x405770
mov al, byte [esi]
lea edi, [esi + 1]
movzx esi, al
test al, al
jns 0x4057a3
and esi, 0x7f
mov cl, byte [edi]
inc edi
movzx eax, cl
and eax, 0x7f
shl esi, 7
add esi, eax
test cl, cl
js 0x405791
mov al, byte [edi]
add ebx, esi
lea esi, [edi + 1]
movzx edi, al
test al, al
jns 0x4057c6
and edi, 0x7f
mov cl, byte [esi]
inc esi
movzx eax, cl
and eax, 0x7f
shl edi, 7
add edi, eax
test cl, cl
js 0x4057b4
mov eax, edx
add edi, ebx
and eax, 3
and edx, 0xfffffffc
cmp byte [esp + 0x62], 0
je 0x4057d9
neg edx
mov ecx, dword [esp + 0x14]
add ecx, edx
mov edx, dword [esp + 0xd8]
cmp edx, ebx
jb 0x405806
cmp edx, edi
jae 0x4057fe
push eax
push ecx
push dword [esp + 0x100]
call dword [esp + 0x100]
test ebp, ebp
jne 0x405760
pop ebp
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0xbc
ret 0x2c
pop edi
pop esi
mov al, 1
pop ebx
add esp, 0xbc
ret 0x2c
mov al, 1
add esp, 0xbc
ret 0x2c