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

Disassembly:
sub esp, 0xb8
mov eax, dword [0x43d504]
xor eax, esp
mov dword [esp + 0xb4], eax
push ebx
push ebp
mov ebp, dword [esp + 0xc4]
push esi
push edi
lea eax, [esp + 0xd0]
push eax
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x1c], ebp
call fcn.004032f7
mov eax, dword [esp + 0x7c]
xor ebx, ebx
add esp, 8
cmp eax, ebx
lea edi, [ebx + 0x10]
je 0x40db5e
xor esi, esi
cmp eax, ebx
jbe 0x40d5d6
cmp esi, eax
jbe 0x40d59c
call fcn.00419676
mov eax, dword [esp + 0x74]
cmp dword [esp + 0x78], edi
mov ecx, dword [esp + 0x64]
jae 0x40d5aa
lea ecx, [esp + 0x64]
cmp byte [ecx + esi], 0x3d
jne 0x40d5cf
cmp esi, eax
jbe 0x40d5b9
call fcn.00419676
cmp dword [esp + 0x78], edi
mov eax, dword [esp + 0x64]
jae 0x40d5c7
lea eax, [esp + 0x64]
mov byte [eax + esi], 0x7c
mov eax, dword [esp + 0x74]
add esi, 1
cmp esi, eax
jb 0x40d59c
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x68]
push edx
lea ecx, [esp + 0xdc]
call fcn.00401550
cmp dword [esp + 0xe8], edi
mov eax, dword [esp + 0xd4]
jae 0x40d601
lea eax, [esp + 0xd4]
mov edx, dword [esp + 0xe4]
lea ecx, [esp + 0xb4]
push ecx
push edx
push eax
lea eax, [esp + 0xa4]
push eax
call fcn.004032ce
lea ecx, [esp + 0xa8]
push ecx
call fcn.0040230e
push ebx
lea edx, [esp + 0xb0]
push edx
lea eax, [esp + 0x60]
push eax
call fcn.004013ba
mov ebp, dword [esp + 0x104]
add esp, 0x20
and ebp, 0x80000001
jns 0x40d656
dec ebp
or ebp, 0xfffffffe
inc ebp
mov edi, dword [esp + 0x58]
xor esi, esi
cmp edi, ebx
mov dword [esp + 0x94], 0xf
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
jbe 0x40d6bf
lea esp, [esp]
mov ecx, esi
and ecx, 1
cmp ecx, ebp
jne 0x40d6b8
cmp esi, edi
jbe 0x40d692
call fcn.00419676
cmp dword [esp + 0x5c], 0x10
mov eax, dword [esp + 0x48]
jae 0x40d6a1
lea eax, [esp + 0x48]
movzx edx, byte [eax + esi]
push edx
push 1
lea ecx, [esp + 0x84]
call fcn.00404889
mov edi, dword [esp + 0x58]
add esi, 1
cmp esi, edi
jb 0x40d680
mov ebp, dword [esp + 0x80]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x48], ebp
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x90]
mov dword [esp + 0x4c], ebp
mov ebp, dword [esp + 0x88]
mov eax, edi
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x94]
push 0xffffffffffffffff
mov dword [esp + 0x98], eax
mov dword [esp + 0x54], ebp
mov ebp, dword [esp + 0x90]
push ebx
lea eax, [esp + 0x4c]
mov dword [esp + 0x60], ecx
push eax
lea ecx, [esp + 0xdc]
mov dword [esp + 0x60], ebp
mov dword [esp + 0x98], esi
mov dword [esp + 0x68], edx
call fcn.004059c0
mov edi, dword [esp + 0xe4]
cmp edi, 0xf
mov dword [esp + 0x40], 0xf
mov dword [esp + 0x3c], ebx
mov byte [esp + 0x2c], bl
je 0x40d79d
push 1
push edi
lea ecx, [esp + 0x30]
call fcn.004019a2
test al, al
je 0x40d796
cmp dword [esp + 0x40], 0x10
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], ebx
jae 0x40d794
lea eax, [esp + 0x2c]
mov byte [eax], bl
mov edi, dword [esp + 0xe4]
mov edx, dword [esp + 0xe8]
cmp edx, 0x10
mov eax, dword [esp + 0xd4]
mov ecx, eax
jae 0x40d7b9
lea ecx, [esp + 0xd4]
lea esi, [ecx + edi]
cmp esi, ebx
je 0x40d7e6
cmp edx, 0x10
mov ecx, eax
jae 0x40d7ce
lea ecx, [esp + 0xd4]
cmp ecx, esi
ja 0x40d7e6
cmp edx, 0x10
mov ecx, eax
jae 0x40d7e0
lea ecx, [esp + 0xd4]
add ecx, edi
cmp esi, ecx
jbe 0x40d7f9
call fcn.00419676
mov edx, dword [esp + 0xe8]
mov eax, dword [esp + 0xd4]
lea ecx, [esp + 0xd0]
mov ebp, ecx
mov ebx, esi
cmp edx, 0x10
jb 0x40d881
xor edi, edi
cmp eax, edi
mov esi, eax
je 0x40d83c
cmp edx, 0x10
mov ecx, eax
jae 0x40d81f
lea ecx, [esp + 0xd4]
cmp ecx, esi
ja 0x40d83c
cmp edx, 0x10
jae 0x40d82f
lea eax, [esp + 0xd4]
mov ecx, dword [esp + 0xe4]
add eax, ecx
cmp esi, eax
jbe 0x40d841
call fcn.00419676
cmp ebp, 0xfffffffe
je 0x40d85a
cmp ebp, edi
je 0x40d855
lea edx, [esp + 0xd0]
cmp ebp, edx
je 0x40d85a
call fcn.00419676
cmp ebx, esi
je 0x40d962
cmp ebp, 0xfffffffe
mov esi, ebp
mov dword [esp + 0x24], ebx
je 0x40d898
cmp ebp, edi
jne 0x40d876
call fcn.00419676
cmp dword [ebp + 0x18], 0x10
jb 0x40d88c
mov eax, dword [ebp + 4]
jmp 0x40d88f
lea esi, [esp + 0xd4]
xor edi, edi
jmp 0x40d811
lea eax, [ebp + 4]
cmp ebx, eax
ja 0x40d898
call fcn.00419676
cmp esi, 0xfffffffe
lea edi, [ebx - 1]
je 0x40d8c5
test esi, esi
jne 0x40d8a9
call fcn.00419676
cmp dword [esi + 0x18], 0x10
jb 0x40d8b4
mov eax, dword [esi + 4]
jmp 0x40d8b7
lea eax, [esi + 4]
mov ecx, dword [esi + 0x14]
add ecx, eax
cmp edi, ecx
jb 0x40d8c5
call fcn.00419676
mov dl, byte [edi]
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0x10], dl
mov edx, dword [esp + 0x40]
cmp edx, 0x10
mov eax, ecx
jae 0x40d8de
lea eax, [esp + 0x2c]
mov esi, dword [esp + 0x3c]
add esi, eax
je 0x40d90a
cmp edx, 0x10
mov eax, ecx
jae 0x40d8f1
lea eax, [esp + 0x2c]
cmp eax, esi
ja 0x40d90a
cmp edx, 0x10
mov eax, ecx
jae 0x40d900
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
add eax, ecx
cmp esi, eax
jbe 0x40d90f
call fcn.00419676
mov edx, dword [esp + 0x10]
push edx
push esi
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x38]
call fcn.0040b700
cmp ebp, 0xfffffffe
je 0x40d94d
test ebp, ebp
jne 0x40d936
call fcn.00419676
cmp dword [ebp + 0x18], 0x10
jb 0x40d941
mov eax, dword [ebp + 4]
jmp 0x40d944
lea eax, [ebp + 4]
cmp ebx, eax
ja 0x40d94d
call fcn.00419676
mov edx, dword [esp + 0xe8]
mov eax, dword [esp + 0xd4]
mov ebx, edi
jmp 0x40d804
mov eax, dword [esp + 0x3c]
cmp eax, 5
jbe 0x40d9f0
jae 0x40d976
call fcn.00419676
cmp dword [esp + 0x40], 0x10
mov eax, dword [esp + 0x2c]
jae 0x40d985
lea eax, [esp + 0x2c]
mov bl, byte [eax + 5]
mov eax, dword [esp + 0x3c]
lea esi, [eax - 5]
cmp esi, eax
jbe 0x40d99c
call fcn.00419676
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
mov ebp, 0x10
cmp dword [esp + 0x40], ebp
jae 0x40d9af
lea edi, [esp + 0x2c]
cmp eax, 5
jae 0x40d9b9
call fcn.00419676
cmp dword [esp + 0x40], ebp
mov eax, dword [esp + 0x2c]
jae 0x40d9c7
lea eax, [esp + 0x2c]
mov cl, byte [edi + esi]
mov byte [eax + 5], cl
mov eax, dword [esp + 0x3c]
lea esi, [eax - 5]
cmp esi, eax
jbe 0x40d9dd
call fcn.00419676
cmp dword [esp + 0x40], ebp
mov eax, dword [esp + 0x2c]
jae 0x40d9eb
lea eax, [esp + 0x2c]
mov byte [eax + esi], bl
xor edi, edi
cmp dword [esp + 0x3c], edi
je 0x40da57
cmp dword [esp + 0x40], 0x10
mov eax, dword [esp + 0x2c]
mov ecx, eax
jae 0x40da07
lea ecx, [esp + 0x2c]
mov bl, byte [ecx]
mov ecx, dword [esp + 0x3c]
lea esi, [ecx - 1]
cmp esi, ecx
jbe 0x40da1d
call fcn.00419676
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x40]
cmp edx, 0x10
mov ecx, eax
jae 0x40da2e
lea ecx, [esp + 0x2c]
mov eax, ecx
mov dl, byte [ecx + esi]
mov byte [eax], dl
mov eax, dword [esp + 0x3c]
lea esi, [eax - 1]
cmp esi, eax
jbe 0x40da43
call fcn.00419676
cmp dword [esp + 0x40], 0x10
mov eax, dword [esp + 0x2c]
jae 0x40da52
lea eax, [esp + 0x2c]
mov byte [eax + esi], bl
xor edi, edi
mov esi, dword [esp + 0x14]
push 0xffffffffffffffff
push edi
lea eax, [esp + 0x30]
mov ebx, 0xf
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], edi
push eax
mov ecx, esi
mov byte [esi + 4], 0
call fcn.00401550
mov ebp, 0x10
cmp dword [esp + 0x40], ebp
jb 0x40da91
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004192c0
add esp, 4
cmp dword [esp + 0x94], ebp
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], edi
mov byte [esp + 0x2c], 0
jb 0x40dab7
mov edx, dword [esp + 0x80]
push edx
call fcn.004192c0
add esp, 4
cmp dword [esp + 0x5c], ebp
mov dword [esp + 0x94], ebx
mov dword [esp + 0x90], edi
mov byte [esp + 0x80], 0
jb 0x40dae0
mov eax, dword [esp + 0x48]
push eax
call fcn.004192c0
add esp, 4
cmp dword [esp + 0xb0], 8
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x58], edi
mov byte [esp + 0x48], 0
jb 0x40db07
mov ecx, dword [esp + 0x9c]
push ecx
call fcn.004192c0
add esp, 4
cmp dword [esp + 0x78], ebp
mov dword [esp + 0xb0], 7
mov dword [esp + 0xac], edi
mov word [esp + 0x9c], di
jb 0x40db34
mov edx, dword [esp + 0x64]
push edx
call fcn.004192c0
add esp, 4
cmp dword [esp + 0xe8], ebp
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], edi
mov byte [esp + 0x64], 0
jb 0x40db5a
mov eax, dword [esp + 0xd4]
push eax
call fcn.004192c0
add esp, 4
mov eax, esi
jmp 0x40dba6
mov esi, 0xf
mov dword [ebp + 0x18], esi
mov dword [ebp + 0x14], ebx
mov byte [ebp + 4], bl
cmp dword [esp + 0x78], edi
jb 0x40db7f
mov ecx, dword [esp + 0x64]
push ecx
call fcn.004192c0
add esp, 4
cmp dword [esp + 0xe8], edi
mov dword [esp + 0x78], esi
mov dword [esp + 0x74], ebx
mov byte [esp + 0x64], bl
jb 0x40dba4
mov edx, dword [esp + 0xd4]
push edx
call fcn.004192c0
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0xc4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00419b1f
add esp, 0xb8
ret 0x28