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

Disassembly:
push 0xffffffffffffffff
push 0x4e5723
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x60
mov al, byte [esp + 3]
push ebx
push ebp
push esi
mov ebx, ecx
push edi
push 0
lea ecx, [esp + 0x44]
mov byte [esp + 0x44], al
call fcn.00401510
mov edi, 0x5144b0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x5144b0
lea ecx, [esp + 0x48]
call fcn.00416e90
mov ecx, dword [ebx + 0x4c]
mov dword [esp + 0x78], 0
call fcn.00434310
mov ecx, dword [eax + 8]
mov edi, 0x5144b0
test ecx, ecx
je 0x40d961
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
mov ecx, dword [esp + 0x4c]
push 0x5144b0
push ecx
push eax
lea ecx, [esp + 0x50]
call fcn.00416410
test eax, eax
jne 0x40da35
mov dl, byte [esp + 0x13]
push eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x54], dl
call fcn.00401510
mov edi, 0x5033d0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x5033d0
lea ecx, [esp + 0x58]
call fcn.00416e90
mov ecx, dword [ebx + 0x4c]
lea eax, [esp + 0x50]
push eax
mov byte [esp + 0x7c], 1
call fcn.00434310
lea ecx, [esp + 0x64]
push eax
push ecx
call fcn.004b0860
add esp, 0xc
mov edx, dword [0x4ec400]
lea ecx, [esp + 0x40]
push edx
push 0
push eax
mov byte [esp + 0x84], 2
call fcn.00415fc0
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x7c], 1
call fcn.00401510
mov byte [esp + 0x78], 0
push 1
lea ecx, [esp + 0x54]
jmp 0x40da30
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x48]
not ecx
dec ecx
push ecx
push 0x5144b0
push eax
push 0
lea ecx, [esp + 0x50]
call fcn.00416410
test eax, eax
jne 0x40da35
mov cl, byte [esp + 0x13]
push eax
mov byte [esp + 0x54], cl
lea ecx, [esp + 0x54]
call fcn.00401510
mov edi, 0x5033d0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x54]
push ebp
call fcn.00401580
test al, al
je 0x40d9df
mov edi, dword [esp + 0x54]
mov ecx, ebp
mov edx, ecx
mov esi, 0x5033d0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x54]
call fcn.00401560
lea eax, [esp + 0x50]
lea ecx, [ebx + 8]
push eax
lea edx, [esp + 0x64]
push ecx
push edx
mov byte [esp + 0x84], 3
call fcn.004b0860
add esp, 0xc
mov ecx, dword [0x4ec400]
mov byte [esp + 0x78], 4
push ecx
push 0
push eax
lea ecx, [esp + 0x4c]
call fcn.00415fc0
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x7c], 3
call fcn.00401510
mov byte [esp + 0x78], 0
push 1
lea ecx, [esp + 0x54]
call fcn.00401510
mov eax, dword [esp + 0x44]
test eax, eax
jne 0x40da42
mov eax, 0x4ec3fc
push eax
mov ecx, ebx
call fcn.00408d10
push 0x98
lea edx, [esp + 0x28]
push eax
push edx
mov ecx, ebx
mov dword [esp + 0x2c], eax
call fcn.00407170
mov ecx, dword [ebx + 0x27c]
xor eax, eax
test ecx, ecx
mov byte [esp + 0x78], 5
je 0x40da76
mov eax, dword [ecx]
call dword [eax + 0x4c]
xor ecx, ecx
test eax, eax
je 0x40da8d
push 0x5033b4
push 9
push eax
mov ecx, ebx
call fcn.00407260
mov ecx, eax
mov eax, dword [ebx + 0x154]
test eax, eax
je 0x40dab2
test ecx, ecx
je 0x40dab2
push 0
push 0
call fcn.0042a810
mov ecx, dword [ebx + 0x154]
push eax
push 0
call fcn.0042f880
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x34], cl
lea ecx, [esp + 0x34]
call fcn.00401510
mov edi, 0x5144b0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x34]
push ebp
call fcn.00401580
test al, al
je 0x40db09
mov edi, dword [esp + 0x34]
mov ecx, ebp
mov edx, ecx
mov esi, 0x5144b0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x34]
call fcn.00401560
mov eax, dword [esp + 0x28]
xor esi, esi
cmp eax, esi
mov byte [esp + 0x78], 6
jle 0x40dc43
mov ebp, 1
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov edi, dword [ecx + eax]
cmp edi, esi
je 0x40dc24
cmp dword [ebx + 0x154], esi
je 0x40dc24
mov ecx, edi
call fcn.00436420
push eax
push ebp
mov ecx, edi
call fcn.0042a810
mov ecx, dword [ebx + 0x154]
push eax
push ebp
call fcn.0042f880
push 0x6c
call fcn.004be7b5
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, esi
mov byte [esp + 0x78], 7
je 0x40db8a
push edi
mov ecx, eax
call fcn.00436220
mov dword [esp + 0x1c], eax
jmp 0x40db8e
mov dword [esp + 0x1c], esi
mov eax, dword [ebx + 0x1f0]
lea esi, [ebx + 0x1e8]
test eax, eax
mov byte [esp + 0x78], 6
jne 0x40dba7
push 2
jmp 0x40dbb2
mov ecx, dword [esi + 4]
cmp eax, ecx
jne 0x40dbb9
lea edx, [ecx + ecx]
push edx
mov ecx, esi
call fcn.004a2120
mov eax, dword [esi + 4]
mov ecx, dword [esi]
mov edx, dword [esp + 0x1c]
mov dword [ecx + eax*4], edx
mov edx, dword [esi + 4]
inc edx
mov ecx, edi
mov dword [esi + 4], edx
call fcn.00436400
test al, al
je 0x40dc22
mov ecx, edi
call fcn.0042a810
mov esi, eax
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov ebp, ecx
lea ecx, [esp + 0x34]
push ebp
call fcn.00401580
test al, al
je 0x40dc1e
mov edi, dword [esp + 0x34]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x38], ebp
mov byte [ecx + ebp], 0
mov ebp, dword [esp + 0x18]
xor esi, esi
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
add edx, 4
inc ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebp
lea edx, [ebp - 1]
cmp edx, eax
jl 0x40db29
mov ecx, dword [ebx + 0x154]
cmp ecx, esi
je 0x40dc74
mov eax, dword [esp + 0x34]
cmp eax, esi
jne 0x40dc5a
mov eax, 0x4ec3fc
push eax
call fcn.0042fff0
cmp eax, 0xffffffff
je 0x40dc68
push eax
jmp 0x40dc69
push esi
mov ecx, dword [ebx + 0x154]
call fcn.0042fd00
mov ecx, ebx
call fcn.0040c1a0
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x1e0], esi
cmp edx, esi
jbe 0x40dd08
mov edi, 0x503328
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [0x4ec400]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x40dcae
call fcn.004b0f00
mov edx, dword [esp + 0x38]
test esi, esi
jbe 0x40dcf1
lea ebp, [edx + esi]
push 0
push ebp
lea ecx, [esp + 0x38]
call fcn.00401580
test al, al
je 0x40dcf1
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
mov ecx, esi
mov esi, 0x503328
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x38], ebp
mov byte [eax + ebp], 0
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x40dcfe
mov eax, 0x4ec3fc
push eax
mov ecx, ebx
call fcn.0040c570
xor esi, esi
mov ecx, dword [esp + 0x20]
cmp ecx, esi
je 0x40dd16
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esp + 0x34]
cmp ecx, esi
je 0x40dd3a
mov al, byte [ecx - 1]
test al, al
je 0x40dd30
cmp al, 0xff
je 0x40dd30
dec al
mov byte [ecx - 1], al
jmp 0x40dd3a
dec ecx
push ecx
call fcn.004b124a
add esp, 4
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], esi
cmp eax, esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
je 0x40dd5b
push eax
call fcn.004b124a
add esp, 4
mov dword [esp + 0x24], esi
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
pop edi
cmp ecx, esi
pop esi
pop ebp
pop ebx
je 0x40dd9a
mov al, byte [ecx - 1]
test al, al
je 0x40dd90
cmp al, 0xff
je 0x40dd90
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
add esp, 0x6c
ret 4
dec ecx
push ecx
call fcn.004b124a
add esp, 4
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
add esp, 0x6c
ret 4