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

Disassembly:
sub esp, 0x50
push ebx
mov ebx, dword [esp + 0x58]
push ebp
mov ebp, dword [esp + 0x60]
push esi
push edi
mov edi, dword [esp + 0x6c]
cmp ebx, 0x1c
mov esi, ecx
mov dword [esp + 0x10], 0
ja 0x40d6bb
je 0x40d69a
lea eax, [ebx - 1]
cmp eax, 0x17
ja case.0x40dcf6.929
xor ecx, ecx
mov cl, byte [eax + 0x40dd7c]
jmp dword [ecx*4 + 0x40dd40]
lea edx, [esp + 0x68]
mov ecx, esi
push edx
push edi
call fcn.0040e5b0
mov bl, al
test bl, bl
je case.0x40dcf6.929
mov al, byte [esp + 0x68]
neg al
sbb eax, eax
neg eax
dec eax
mov dword [esp + 0x10], eax
jmp 0x40dd19
mov ecx, esi
call fcn.0040e670
jmp case.0x40dcf6.929
mov ecx, edi
shr ecx, 0x10
movsx edx, cx
movsx eax, di
push edx
push eax
mov ecx, esi
call fcn.0040f450
jmp 0x40dd17
cmp ebp, 4
ja case.0x40d5ac.0
jmp dword [ebp*4 + 0x40dd94]
mov ecx, edi
mov edx, edi
shr ecx, 0x10
push ebp
and edx, 0xffff
push ecx
push edx
mov ecx, esi
call fcn.0040f4c0
jmp 0x40dd17
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x68]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push edi
push ebp
mov ecx, esi
call fcn.0040d420
cmp word [esp + 0x68], 0
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x14]
push eax
setne cl
and edx, 0xffff
push ecx
push edx
mov ecx, esi
call fcn.0040e6d0
jmp 0x40dd17
push ebp
mov ecx, esi
call fcn.0040e740
jmp 0x40dd17
push ebp
mov ecx, esi
call fcn.0040e840
jmp 0x40dd17
mov ecx, esi
call fcn.0040f120
jmp 0x40dd17
pop edi
pop esi
mov dword [esp + 8], 1
mov eax, dword [esp + 8]
pop ebp
pop ebx
add esp, 0x50
ret 0xc
test ebp, ebp
setne al
push edi
push eax
mov ecx, esi
call fcn.0040e8f0
jmp 0x40dd17
mov ecx, esi
call fcn.0040ec70
jmp 0x40dd17
push ebp
mov ecx, esi
call fcn.0040f1f0
jmp 0x40d8b8
lea ecx, [esp + 0x10]
push ecx
push edi
mov ecx, esi
call fcn.0040e480
jmp 0x40dd17
test ebp, ebp
setne dl
push edi
push edx
mov ecx, esi
call fcn.0040e510
jmp 0x40dd17
mov eax, dword [0x48bfd8]
mov ebx, dword [eax]
call fcn.0040bd60
test ebp, ebp
setne cl
push eax
push ecx
mov ecx, dword [0x48bfd8]
call dword [ebx + 0x78]
jmp case.0x40dcf6.929
cmp ebx, 0x110
ja 0x40dae1
je 0x40dac2
lea eax, [ebx - 0x20]
cmp eax, 0xe6
ja case.0x40dcf6.929
xor edx, edx
mov dl, byte [eax + 0x40ddd8]
jmp dword [edx*4 + 0x40dda8]
lea eax, [esp + 0x10]
mov ecx, esi
push eax
push edi
push ebp
call fcn.0040e420
jmp 0x40dd17
push edi
cmp ebx, 0x2b
mov ecx, esi
push ebp
jne 0x40d713
mov edx, dword [esi]
call dword [edx + 0x1d4]
jmp 0x40d8b8
mov eax, dword [esi]
call dword [eax + 0x1d8]
jmp 0x40d8b8
mov eax, dword [esi + 0x100]
test eax, eax
jne case.0x40dcf6.929
mov edx, dword [esi]
mov ecx, esi
mov dword [esp + 0x10], 0x80
call dword [edx + 0x88]
test eax, 0x40000
je 0x40dd32
mov eax, dword [esp + 0x10]
pop edi
or al, 7
pop esi
pop ebp
mov dword [esp + 4], eax
pop ebx
add esp, 0x50
ret 0xc
mov eax, ebp
push edi
and eax, 0xffff
mov ecx, esi
push eax
mov dword [esp + 0x70], eax
call fcn.0040fc40
mov cl, byte [esi + 0x104]
shl al, 3
xor al, cl
and al, 8
xor al, cl
test al, 8
mov byte [esi + 0x104], al
je 0x40d790
mov bl, 1
jmp 0x40d7f3
lea eax, [ebp - 8]
cmp eax, 0xd6
ja case.0x40d7a2.11
xor ecx, ecx
mov cl, byte [eax + 0x40ded0]
jmp dword [ecx*4 + 0x40dec0]
xor bl, bl
jmp 0x40d7f3
lea edx, [esp + 0x68]
lea eax, [esp + 0x6c]
push edx
lea ecx, [esp + 0x18]
push eax
push ecx
push esi
call fcn.00410b20
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x24]
add esp, 0x10
push edx
push eax
push ecx
push 0x204
mov ecx, esi
call fcn.0040f830
jmp 0x40d7f1
mov edx, dword [esp + 0x68]
push 0
push edi
push edx
mov ecx, esi
call fcn.0040fb70
mov bl, al
cmp dword [esp + 0x64], 0x104
je case.0x40dcf6.929
jmp 0x40dd19
cmp ebp, 0x5d
jne 0x40d843
lea eax, [esp + 0x68]
lea ecx, [esp + 0x6c]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
push esi
call fcn.00410b20
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x24]
add esp, 0x10
push eax
push ecx
push edx
push 0x205
mov ecx, esi
call fcn.0040f830
jmp 0x40dd17
mov eax, ebp
push edi
and eax, 0xffff
mov ecx, esi
push eax
call fcn.0040fcc0
jmp 0x40dd17
mov al, byte [esi + 0x104]
test al, 8
je 0x40d878
and al, 0xf7
pop edi
mov byte [esi + 0x104], al
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
mov ecx, ebp
push 1
and ecx, 0xffff
push edi
push ecx
mov ecx, esi
call fcn.0040fb70
jmp 0x40dd17
mov ecx, esi
call fcn.0040ecc0
jmp 0x40dd17
push edi
mov ecx, esi
call fcn.0040f540
jmp 0x40dd17
mov edx, edi
mov ecx, esi
shr edx, 0x10
push edx
push edi
push ebp
call fcn.0040eb10
mov bl, al
test bl, bl
je case.0x40dcf6.929
mov dword [esp + 0x10], 1
jmp 0x40dd19
mov eax, dword [edi + 4]
cmp eax, 1
jne 0x40d9bc
xor al, al
mov ebx, esi
test esi, esi
je 0x40dd17
test al, al
jne 0x40dd17
mov ecx, dword [ebx + 0x28]
mov edx, dword [0x48b79c]
mov eax, dword [edi + 0x18]
mov ebp, dword [edi + 0x14]
push ecx
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], eax
call fcn.004069c0
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 0x5c]
mov dword [esp + 0x54], eax
mov eax, dword [0x481810]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x50], ebp
mov dword [esp + 0x1c], 0x474efc
mov dword [esp + 0x24], esi
mov edx, dword [ecx]
lea eax, [esp + 0x1c]
push eax
call dword [edx + 0x10]
mov ecx, dword [esp + 0x5c]
mov ebx, dword [ebx + 0x2c]
add ecx, 0xfffffff4
mov byte [esp + 0x6c], al
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x40d960
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40d960
call fcn.00416980
mov edx, dword [esp + 0x58]
mov eax, dword [edx - 0xc]
lea ecx, [edx - 0xc]
cmp eax, 0xffffffff
je 0x40d97b
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40d97b
call fcn.00416980
mov eax, dword [esp + 0x3c]
lea ecx, [eax - 0xc]
mov eax, dword [eax - 0xc]
cmp eax, 0xffffffff
je 0x40d996
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40d996
call fcn.00416980
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x473d04
call fcn.00409a70
mov al, byte [esp + 0x6c]
mov ebp, dword [esp + 0x68]
test ebx, ebx
jne 0x40d8e7
jmp 0x40dd17
cmp eax, 2
jne case.0x40dcf6.929
mov ecx, dword [edi + 8]
mov edx, dword [0x48b79c]
push ecx
push edx
lea ecx, [esp + 0x24]
call fcn.004069c0
mov eax, dword [0x48c4f8]
mov ecx, dword [0x48c4fc]
mov dword [esp + 0x50], eax
mov eax, dword [0x481810]
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 0x5c]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x1c], 0x474efc
mov dword [esp + 0x24], esi
mov edx, dword [ecx]
lea eax, [esp + 0x1c]
push eax
call dword [edx + 0x10]
mov ecx, dword [esp + 0x5c]
mov bl, al
add ecx, 0xfffffff4
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x40da2e
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40da2e
call fcn.00416980
mov edx, dword [esp + 0x58]
mov eax, dword [edx - 0xc]
lea ecx, [edx - 0xc]
cmp eax, 0xffffffff
je 0x40da91
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40da91
call fcn.00416980
jmp 0x40da91
mov eax, dword [esi + 0x28]
mov ecx, edi
shr ecx, 0x10
movsx edx, cx
mov ecx, dword [0x48b7fc]
push eax
push ecx
lea ecx, [esp + 0x24]
movsx ebx, di
mov dword [esp + 0x20], edx
call fcn.004069c0
mov edx, dword [esp + 0x18]
mov ecx, dword [esi + 0x5c]
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x1c], 0x474f10
mov eax, dword [ecx]
lea edx, [esp + 0x1c]
push edx
call dword [eax + 0x10]
mov bl, al
mov eax, dword [esp + 0x3c]
lea ecx, [eax - 0xc]
mov eax, dword [eax - 0xc]
cmp eax, 0xffffffff
je 0x40daac
dec eax
test eax, eax
mov dword [ecx], eax
jne 0x40daac
call fcn.00416980
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x473d04
call fcn.00409a70
jmp 0x40dd19
push ebp
mov ecx, esi
call fcn.0040e950
mov bl, al
test bl, bl
je case.0x40dcf6.929
mov dword [esp + 0x10], 0
jmp 0x40dd19
cmp ebx, 0x20a
ja 0x40dc9d
je 0x40dc92
lea eax, [ebx - 0x111]
cmp eax, 0xf8
ja case.0x40dcf6.929
xor ecx, ecx
mov cl, byte [eax + 0x40dfc4]
jmp dword [ecx*4 + 0x40dfa8]
mov edx, edi
push ebp
shr edx, 0x10
movsx eax, dx
movsx ecx, di
push eax
push ecx
mov ecx, esi
call fcn.0040f920
jmp 0x40dd17
mov eax, edi
shr eax, 0x10
movsx edx, di
movsx ecx, ax
mov dword [esp + 0x14], edx
mov dword [esp + 0x6c], ecx
call fcn.0040bf90
cmp eax, esi
jne 0x40db4f
mov dword [esp + 0x68], esi
jmp 0x40dba2
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
push eax
push esi
call fcn.0040f780
add esp, 0xc
mov dword [esp + 0x68], eax
test eax, eax
jne 0x40db74
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc
mov ecx, dword [eax + 0x100]
test ecx, ecx
jne 0x40dba2
cmp ebx, 0x201
jne 0x40dba2
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
call dword [edx + 0xa8]
test al, al
je 0x40dba2
mov ecx, dword [esp + 0x68]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x64]
push ebp
push ecx
mov ecx, dword [esp + 0x70]
push edx
push eax
call fcn.0040f830
jmp 0x40dd17
push edi
push ebp
mov ecx, esi
call fcn.0040f6c0
jmp 0x40dd17
lea ecx, [esp + 0x6c]
lea edx, [esp + 0x68]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push edi
push ebp
mov ecx, esi
call fcn.0040d3f0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x14]
push ecx
push edx
push eax
mov ecx, esi
call fcn.0040f5a0
jmp 0x40dd17
lea ecx, [esp + 0x68]
lea edx, [esp + 0x6c]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push edi
push ebp
mov ecx, esi
call fcn.0040d420
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov ebx, dword [esp + 0x64]
push eax
mov eax, dword [esp + 0x18]
push ecx
mov edx, dword [esi]
xor ecx, ecx
cmp ebx, 0x114
push eax
setne cl
lea ecx, [ecx*4 + 4]
push ecx
mov ecx, esi
call dword [edx + 0x1cc]
jmp 0x40dd17
lea edx, [esp + 0x6c]
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x6c]
push eax
push ecx
push edi
push ebp
mov ecx, esi
call fcn.0040d450
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x6c]
push edi
push ebp
and eax, 0xffff
push edx
mov edx, dword [esp + 0x20]
push eax
push ecx
lea eax, [esp + 0x24]
push edx
push eax
mov ecx, esi
call fcn.0040ed10
jmp 0x40dd17
push edi
push ebp
mov ecx, esi
call fcn.0040f9c0
jmp 0x40dd17
cmp ebx, 0x311
ja 0x40dce3
je 0x40dcd9
sub ebx, 0x215
je 0x40dccf
sub ebx, 0x1e
je 0x40dcc5
sub ebx, 0xdc
jne case.0x40dcf6.929
mov ecx, esi
call fcn.0040ef30
jmp 0x40dd17
push ebp
mov ecx, esi
call fcn.0040e9a0
jmp 0x40dd17
push edi
mov ecx, esi
call fcn.0040eec0
jmp 0x40dd17
push ebp
mov ecx, esi
call fcn.0040eda0
jmp 0x40dd17
lea eax, [ebx - 0x3a0]
cmp eax, 0x18
ja case.0x40dcf6.929
xor ecx, ecx
mov cl, byte [eax + 0x40e0c8]
jmp dword [ecx*4 + 0x40e0c0]
mov edx, edi
push ebp
shr edx, 0x10
movsx eax, dx
mov edx, dword [esp + 0x68]
push eax
movsx ecx, di
push ecx
push edx
mov ecx, esi
call fcn.0040fd40
mov bl, al
test bl, bl
jne 0x40dd32
mov ecx, dword [esp + 0x64]
mov eax, dword [esi]
push edi
push ebp
push ecx
mov ecx, esi
call dword [eax + 0x1e0]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x50
ret 0xc