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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, ecx
mov eax, dword [0x47f2f4]
test eax, eax
jne 0x40d63f
mov eax, 0xcfdf4ed6
xor eax, dword [0x45fdf0]
mov dword [0x45fe1c], eax
mov eax, dword [0x45fdf4]
lea ecx, [eax + eax]
and ecx, 0x520b1a4c
neg ecx
add eax, ecx
add eax, 0xa9058d26
mov ecx, 0xf52cc41d
xor ecx, dword [0x45fdf8]
mov dword [0x45fe20], eax
mov dword [0x45fe24], ecx
mov eax, dword [0x45fdfc]
lea ecx, [eax + eax]
and ecx, 0x37cb8d4c
neg ecx
add eax, ecx
add eax, 0x9be5c6a6
mov dword [0x45fe28], eax
mov eax, 0x2570b6c3
xor eax, dword [0x45fe00]
mov dword [0x45fe2c], eax
mov eax, 0x66de74b4
xor eax, dword [0x45fe04]
mov dword [0x45fe30], eax
mov eax, 0x87ceef12
xor eax, dword [0x45fe08]
mov dword [0x45fe34], eax
mov dword [0x47f2f4], 1
test byte [esi + 0xa], 8
mov dword [esp + 4], edx
jne 0x40d65c
xor edx, edx
cmp dword [esi], 0
jne 0x40d686
jmp 0x40d66d
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
setbe dl
cmp dword [esi], 0
jne 0x40d686
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x14ccc
jb 0x40d686
add ecx, dword [esi + 0x74]
jmp 0x40d68c
lea ecx, [esi + 0x39272]
mov dword [esi + 0x30], ecx
mov dword [esp + 0xc], ecx
lea eax, [ecx + 0x14cbc]
mov dword [esi + 0x34], eax
mov dword [esi + 0x58], 0
mov dword [esi + 0x5c], 0
mov eax, dword [esi + 0x2c]
movzx ebx, byte [eax]
movzx ecx, byte [esi + 0x38]
shr ebx, cl
mov byte [eax], bl
mov ecx, dword [esi + 8]
xor eax, eax
cmp dword [esi + 0x38], 8
sete al
sub dword [esi + 0x28], eax
test ecx, 0x1000
je 0x40d6d9
cmp dword [esi + 0x64], 0
je 0x40d7fc
xor ebx, ebx
cmp dword [esp + 4], 4
sete bl
mov ecx, dword [esi + 0x44]
shl ebx, cl
lea eax, [esi + 0x44]
mov dword [esp], eax
or ebx, dword [esi + 0x48]
lea edi, [esi + 0x48]
mov dword [esi + 0x48], ebx
mov eax, ecx
and eax, 1
xor ecx, 1
lea ebp, [ecx + eax*2]
mov dword [esi + 0x44], ebp
cmp ebp, 8
jae 0x40d796
mov eax, dword [esi + 0x30]
mov dword [esp + 8], eax
xor eax, eax
test dl, dl
jne 0x40d747
mov al, 1
test byte [esi + 0xa], 4
jne 0x40d72a
cmp dword [esi + 0x3c], 0x30
setb al
movzx edx, al
mov ecx, esi
call fcn.00410560
mov ecx, dword [esi + 0x3c]
test ecx, ecx
je 0x40d752
mov edx, dword [esi + 0x30]
sub edx, dword [esp + 8]
inc edx
cmp edx, ecx
jb 0x40d752
mov ecx, dword [esi + 0x1c]
sub ecx, dword [esi + 0x40]
cmp ecx, dword [esi + 0x24]
jbe 0x40d7ae
test eax, eax
jne 0x40da51
mov eax, dword [esp + 8]
mov dword [esi + 0x30], eax
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ebp
mov ecx, esi
mov edx, 1
call fcn.00410560
jmp 0x40da51
shr ebx, 8
mov dword [edi], ebx
add ebp, 0xfffffff8
mov eax, dword [esp]
mov dword [eax], ebp
cmp ebp, 7
jbe 0x40d70e
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d780
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ebp, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40d780
mov eax, dword [esp + 8]
mov dword [esi + 0x30], eax
mov dword [esi + 0x48], ebx
lea eax, [ebp + 2]
mov dword [esi + 0x44], eax
cmp ebp, 6
jb 0x40d8fa
mov ebp, dword [esp]
jmp 0x40d7e4
shr ebx, 8
mov dword [edi], ebx
add eax, 0xfffffff8
mov dword [ebp], eax
cmp eax, 7
jbe 0x40d8ff
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40d7d0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40d7d0
and ecx, 0xfff
xor eax, eax
cmp dword [0x45fe1c], ecx
je 0x40d84a
cmp dword [0x45fe20], ecx
je 0x40d84a
mov eax, 0x40
cmp dword [0x45fe24], ecx
je 0x40d84a
cmp dword [0x45fe28], ecx
je 0x40d84a
cmp dword [0x45fe2c], ecx
je 0x40d84a
cmp dword [0x45fe30], ecx
je 0x40d84a
xor eax, eax
cmp dword [0x45fe34], ecx
setne al
or eax, 2
shl eax, 6
lea ecx, [eax + 0x7800]
imul edi, ecx, 0x4211
shr edi, 0x13
mov ebp, edi
shl ebp, 5
mov ecx, dword [esi + 0x44]
mov ebx, pe_nt_image_headers32
shl ebx, cl
sub edi, ebp
add edi, eax
add edi, 0x7800
or ebx, dword [esi + 0x48]
movzx edi, di
mov dword [esi + 0x48], ebx
sub ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
jb 0x40d8e1
or eax, edi
xor eax, 0x1f
shl eax, cl
or eax, ebx
mov dword [esi + 0x48], eax
add ecx, 8
mov dword [esi + 0x44], ecx
jmp 0x40d8b5
shr eax, 8
mov dword [esi + 0x48], eax
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40d6d9
mov edi, dword [esi + 0x30]
cmp edi, dword [esi + 0x34]
jae 0x40d8a0
lea ecx, [edi + 1]
mov dword [esi + 0x30], ecx
mov byte [edi], al
mov ecx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40d8a0
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x40d883
mov ebp, dword [esi + 0x30]
cmp ebp, dword [esi + 0x34]
jae 0x40d8d0
lea ecx, [ebp + 1]
mov dword [esi + 0x30], ecx
mov byte [ebp], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40d8d0
mov ebp, dword [esp]
jmp 0x40d903
test eax, eax
je 0x40d948
mov ecx, eax
xor ecx, 0xfffffff7
lea edx, [eax + eax]
or edx, 0xffffffef
add ecx, eax
sub ecx, edx
mov dword [ebp], ecx
cmp ecx, 8
jae 0x40d930
jmp 0x40d94a
shr ebx, 8
mov dword [edi], ebx
add ecx, 0xfffffff8
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40d94a
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40d920
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x40d920
xor ecx, ecx
movzx edx, word [esi + 0x3c]
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
or ecx, 0x10
mov dword [esi + 0x44], ecx
jmp 0x40d97e
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
shr edx, 8
mov dword [edi], edx
lea ecx, [eax - 8]
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40d98a
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jb 0x40d960
mov eax, ecx
jmp 0x40d96e
mov ebx, 0xffff
xor ebx, dword [esi + 0x3c]
mov dword [esi + 0x3c], ebx
movzx ebx, bx
shl ebx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add eax, 8
mov dword [esi + 0x44], eax
jmp 0x40d9c0
shr edx, 8
mov dword [edi], edx
add eax, 0xfffffff8
mov dword [ebp], eax
cmp eax, 7
jbe 0x40d9d8
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40d9b0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40d9b0
xor dword [esi + 0x3c], 0xffff
je 0x40da51
xor ebx, ebx
jmp 0x40d9f6
inc ebx
cmp ebx, dword [esi + 0x3c]
jae 0x40da51
mov ecx, dword [esi + 0x40]
add ecx, ebx
and ecx, 0x7fff
movzx ebp, byte [esi + ecx + 0x90]
mov ecx, eax
shl ebp, cl
or edx, ebp
mov dword [esi + 0x48], edx
add eax, 8
mov dword [esi + 0x44], eax
mov ebp, dword [esp]
jmp 0x40da39
shr edx, 8
mov dword [edi], edx
mov ecx, eax
xor ecx, 0xfffffff7
and eax, 0xfffffff7
lea eax, [ecx + eax*2]
inc eax
mov dword [ebp], eax
cmp eax, 7
jbe 0x40d9f0
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40da20
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x40da20
mov eax, dword [esp + 4]
test eax, eax
mov ebp, dword [esp]
je 0x40db43
cmp eax, 4
jne 0x40daab
cmp dword [ebp], 0
je 0x40db37
mov dword [ebp], 8
mov ecx, 8
jmp 0x40da92
shr dword [edi], 8
add ecx, 0xfffffff8
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40db39
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x40da80
movzx ecx, byte [esi + 0x48]
lea edx, [eax + 1]
mov dword [esi + 0x30], edx
mov byte [eax], cl
mov ecx, dword [esi + 0x44]
jmp 0x40da80
mov eax, dword [ebp]
add eax, 3
mov dword [ebp], eax
cmp eax, 8
jae 0x40db16
test eax, eax
je 0x40dd3c
mov dword [ebp], 8
mov edx, 8
jmp 0x40dae2
mov eax, dword [edi]
shr eax, 8
mov dword [edi], eax
lea edx, [ecx - 8]
mov dword [ebp], edx
cmp edx, 7
jbe 0x40db2f
mov eax, dword [esi + 0x30]
mov ecx, edx
cmp eax, dword [esi + 0x34]
jae 0x40dad0
movzx ecx, byte [esi + 0x48]
lea edx, [eax + 1]
mov dword [esi + 0x30], edx
mov byte [eax], cl
mov ecx, dword [esi + 0x44]
jmp 0x40dad0
shr dword [edi], 8
mov ecx, eax
or ecx, 0xfffffff7
and eax, 0xfffffff7
add eax, ecx
inc eax
mov dword [ebp], eax
cmp eax, 7
jbe 0x40dab9
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40db00
movzx eax, byte [esi + 0x48]
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov eax, dword [esi + 0x44]
jmp 0x40db00
add ecx, 8
jmp 0x40dd43
xor ecx, ecx
test byte [esi + 9], 0x10
jne 0x40dbf2
lea eax, [esi + 0x8192]
lea edi, [esi + 0x9272]
lea ebx, [esi + 0x9273]
push 0x280
push 0
push eax
call fcn.004179c0
add esp, 0xc
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], edi
mov dword [esi + 0x38], 8
mov edi, dword [esi + 0x30]
mov eax, dword [esi + 0x3c]
add dword [esi + 0x40], eax
mov dword [esi + 0x3c], 0
inc dword [esi + 0x64]
mov ecx, dword [esp + 0xc]
sub edi, ecx
je 0x40ddf0
cmp dword [esi], 0
je 0x40dbd9
mov eax, dword [esi + 0x84]
mov ecx, dword [esi + 0x70]
mov edx, dword [esi + 0x78]
mov ebx, ecx
xor ebx, eax
not ecx
and ecx, eax
add ecx, ecx
sub ecx, ebx
mov dword [edx], ecx
lea eax, [esi + 0x39272]
push dword [esi + 4]
push edi
push eax
call dword [esi]
add esp, 0xc
test eax, eax
jne 0x40ddf0
mov dword [esi + 0x6c], 0xffffffff
mov eax, 0xffffffff
jmp 0x40ddf3
lea eax, [esi + 0x39272]
cmp ecx, eax
je 0x40ddbc
add dword [esi + 0x8c], edi
jmp 0x40ddf0
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x48]
mov dword [esp + 4], eax
shr eax, 0x18
shl eax, cl
mov ebx, edx
xor ebx, eax
not eax
and eax, edx
add ebx, edx
sub ebx, eax
mov dword [esi + 0x48], ebx
or ecx, 8
mov dword [esi + 0x44], ecx
jmp 0x40dc3e
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
shr ebx, 8
mov dword [edi], ebx
lea ecx, [eax - 8]
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40dc4a
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jb 0x40dc20
mov eax, ecx
jmp 0x40dc2e
mov edx, dword [esp + 4]
shr edx, 0x10
movzx ebp, dl
shl ebp, cl
mov edx, ebx
xor edx, ebp
not ebp
and ebp, ebx
add edx, ebx
sub edx, ebp
mov ebx, dword [esp]
mov dword [edi], edx
mov dword [ebx], eax
jmp 0x40dc8d
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
shr edx, 8
mov dword [edi], edx
lea eax, [ecx - 8]
mov dword [ebx], eax
cmp eax, 7
jbe 0x40dc99
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jb 0x40dc70
mov ecx, eax
jmp 0x40dc7e
mov ebx, ecx
mov ecx, dword [esp + 4]
movzx ebp, ch
mov ecx, eax
shl ebp, cl
mov ecx, ebx
mov ebx, edx
xor ebx, ebp
not ebp
and ebp, edx
add ebx, edx
sub ebx, ebp
mov ebp, dword [esp]
mov dword [edi], ebx
mov dword [ebp], ecx
jmp 0x40dcde
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
shr ebx, 8
mov dword [edi], ebx
lea ecx, [eax - 8]
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40dcea
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jb 0x40dcc0
mov eax, ecx
jmp 0x40dcce
movzx edx, byte [esp + 4]
shl edx, cl
mov ecx, ebx
xor ecx, edx
not edx
and edx, ebx
add ecx, ebx
sub ecx, edx
mov dword [edi], ecx
mov dword [ebp], eax
jmp 0x40dd24
shr ecx, 8
mov dword [edi], ecx
add eax, 0xfffffff8
mov dword [ebp], eax
cmp eax, 7
jbe 0x40db43
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x40dd10
lea eax, [edx + 1]
mov dword [esi + 0x30], eax
mov byte [edx], cl
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x48]
jmp 0x40dd10
mov eax, dword [edi]
mov ecx, 0x10
mov dword [edi], eax
mov dword [ebp], ecx
jmp 0x40dd6e
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
shr eax, 8
mov dword [edi], eax
lea ecx, [edx - 8]
mov dword [ebp], ecx
cmp ecx, 7
jbe 0x40dd7a
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jb 0x40dd50
mov edx, ecx
jmp 0x40dd5e
mov ebx, 0xffff
shl ebx, cl
or eax, ebx
mov dword [edi], eax
add edx, 8
mov dword [ebp], edx
jmp 0x40dda4
shr eax, 8
mov dword [edi], eax
add edx, 0xfffffff8
mov dword [ebp], edx
cmp edx, 7
jbe 0x40db43
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40dd90
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x40dd90
mov ecx, dword [esi + 0x7c]
mov edx, dword [esi + 0x8c]
mov ebp, dword [ecx]
sub ebp, edx
cmp edi, ebp
mov ebx, ebp
cmovb ebx, edi
add edx, dword [esi + 0x74]
push ebx
push eax
push edx
call fcn.004176b0
add esp, 0xc
add dword [esi + 0x8c], ebx
cmp edi, ebp
jbe 0x40ddf0
sub edi, ebx
mov dword [esi + 0x58], ebx
mov dword [esi + 0x5c], edi
mov eax, dword [esi + 0x5c]
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret