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

Disassembly:
push 0xffffffffffffffff
push 0x451c2e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x17c
push ebx
push ebp
push esi
lea eax, [esp + 0x48]
push edi
push eax
push str..eme
call dword [0x452068]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x40dd13
mov ecx, dword [0x459814]
xor esi, esi
mov ebx, dword [ecx + 0xdc]
test ebx, ebx
jbe 0x40d7fa
xor edi, edi
mov edx, dword [0x459814]
mov eax, dword [edx + 0xd8]
lea edx, [esp + 0x78]
lea ecx, [eax + edi + 0x3c]
push ecx
push edx
call fcn.00439e00
add esp, 8
test eax, eax
je 0x40dc41
inc esi
add edi, 0x184
cmp esi, ebx
jb 0x40d7c0
cmp esi, 0xffffffff
je 0x40dc41
lea eax, [esp + 0x38]
lea ecx, [esp + 0x78]
push eax
push ecx
call fcn.0040fe80
add esp, 8
test eax, eax
je 0x40dc41
call fcn.0040d310
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x19c]
mov ebx, eax
lea edi, [esp + 0x78]
mov dword [esp + 0x2c], ebx
mov dword [ebx], edx
mov eax, dword [esp + 0x3c]
mov dword [ebx + 4], eax
mov dword [ebx + 0x38], ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebx + 0x3c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebx + 0x7c]
push ecx
push 0x105
call dword [0x452178]
lea edx, [esp + 0x78]
push 0x454b4c
push edx
call fcn.004467e9
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x34], edi
je 0x40dc41
push 0
push 0
push edi
call fcn.004466ff
push edi
push 1
lea eax, [esp + 0x54]
push 8
push eax
call fcn.004465e8
add esp, 0x1c
mov byte [esp + 0x48], 0
mov ebp, str.RREDATA
lea esi, [esp + 0x40]
mov cl, byte [esi]
mov dl, byte [ebp]
mov al, cl
cmp cl, dl
jne 0x40d8dc
test al, al
je 0x40d8d8
mov dl, byte [esi + 1]
mov cl, byte [ebp + 1]
mov al, dl
cmp dl, cl
jne 0x40d8dc
add esi, 2
add ebp, 2
test al, al
jne 0x40d8b3
xor eax, eax
jmp 0x40d8e1
sbb eax, eax
sbb eax, 0xffffffff
xor ebp, ebp
cmp eax, ebp
jne 0x40dc38
lea esi, [ebx + 0xc]
push 2
push 0xfffffffffffffffc
push edi
mov dword [esi], ebp
call fcn.004466ff
push edi
push 1
push 4
push esi
call fcn.004465e8
mov eax, dword [esi]
add esp, 0x1c
cmp eax, ebp
je 0x40dc38
lea eax, [eax + eax*2]
shl eax, 5
push eax
call fcn.00445e37
add esp, 4
cmp eax, ebp
mov dword [ebx + 8], eax
jne 0x40d93d
mov ecx, dword [0x4595e0]
mov dword [ecx + 0x140], 1
jmp 0x40dc38
mov eax, dword [esi]
push 2
lea edx, [eax + eax*2]
mov eax, 0xffffffd4
shl edx, 5
sub eax, edx
push eax
push edi
call fcn.004466ff
push edi
lea eax, [ebx + 0x10]
push 1
push 0x28
push eax
call fcn.004465e8
mov ecx, dword [esi]
mov edx, dword [ebx + 8]
push edi
push ecx
push 0x60
push edx
call fcn.004465e8
mov esi, dword [esi]
add esp, 0x2c
cmp esi, ebp
mov dword [esp + 0x30], esi
mov dword [esp + 0x1c], ebp
jbe 0x40dc38
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x18]
mov eax, dword [ebx + 8]
add ebp, eax
push 0x60
lea esi, [ebx + 0x10]
push ebp
push esi
call fcn.0040fa50
mov eax, dword [ebp + 0x44]
mov dword [ebp + 0x58], ebx
mov edx, dword [ebx + 0x38]
add esp, 0xc
or edx, eax
mov dword [ebx + 0x38], edx
mov eax, dword [ebp + 0x48]
sub eax, 3
je 0x40d9f1
dec eax
je 0x40d9de
dec eax
je 0x40d9cb
mov dword [ebp + 0x5c], 0
jmp 0x40dc18
mov dword [ebp + 0x48], 0x10000005
mov dword [ebp + 0x5c], 0
jmp 0x40dc18
mov dword [ebp + 0x48], 0x10000004
mov dword [ebp + 0x5c], 0
jmp 0x40dc18
push 0x14
push 1
call fcn.004464ab
add esp, 8
mov dword [ebp + 0x5c], eax
test eax, eax
je 0x40dc5e
mov ecx, dword [ebp + 0x54]
push 0
push ecx
push edi
call fcn.004466ff
push edi
push 1
lea edx, [esp + 0x34]
push 0xc
push edx
call fcn.004465e8
lea eax, [esp + 0x3c]
push 0xc
push eax
push esi
call fcn.0040fa50
push 8
call fcn.0044596b
add esp, 0x2c
mov dword [esp + 0x10], eax
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x194], ecx
je 0x40da5a
mov ecx, eax
call fcn.00417b80
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x40da60
mov dword [esp + 0x10], ecx
mov esi, ecx
test esi, esi
mov dword [esp + 0x194], 0xffffffff
je 0x40dc89
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40db6d
push 0
push eax
mov ecx, 0x459e40
call fcn.0043aee0
mov ebx, eax
test ebx, ebx
je 0x40dcb0
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cx, word [ebp + 0x42]
xor edx, edx
mov dx, word [ebp + 0x40]
push ecx
mov ecx, dword [ebx + 4]
push edx
push edi
push eax
push ecx
call fcn.0040fee0
mov edx, dword [ebx + 4]
mov eax, dword [esp + 0x38]
mov byte [edx + eax], 0
mov ecx, dword [ebx + 4]
push ecx
call fcn.00439100
mov edx, dword [esp + 0x3c]
inc edx
push edx
call fcn.00445e37
mov ecx, dword [ebp + 0x5c]
add esp, 0x1c
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0x5c]
mov eax, dword [edx + 8]
test eax, eax
je 0x40dcc6
mov ecx, dword [esp + 0x24]
mov esi, dword [ebx + 4]
mov edi, eax
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 [ebp + 0x5c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x10]
mov dword [ecx + 0xc], edx
mov eax, dword [ebp + 0x5c]
mov edx, dword [esp + 0x24]
mov ecx, dword [eax + 8]
mov byte [ecx + edx], 0
mov eax, dword [ebx + 4]
push eax
mov ecx, esi
call fcn.00417200
push ebx
mov ecx, esi
call fcn.00417040
mov ecx, dword [0x459814]
push ebx
add ecx, 0x494
call fcn.00417040
mov edx, dword [ebx + 4]
push edx
call fcn.00417f70
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 0x5c]
push eax
push ecx
call fcn.00417700
add esp, 0xc
mov ecx, 0x459e40
push ebx
call fcn.0043ae90
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x2c]
mov edx, dword [ebp + 0x50]
push 0
push edx
mov ecx, 0x459e40
call fcn.0043aee0
mov esi, eax
test esi, esi
je 0x40dce7
mov edx, dword [ebp + 0x4c]
xor eax, eax
mov ax, word [ebp + 0x42]
xor ecx, ecx
mov cx, word [ebp + 0x40]
push eax
mov eax, dword [esi + 4]
push ecx
push edi
push edx
push eax
call fcn.0040fee0
mov ecx, dword [esi + 4]
push ecx
call fcn.00439100
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x28]
add esp, 0x18
push edx
call fcn.00417200
mov ecx, dword [esp + 0x10]
push esi
call fcn.00417040
mov ecx, dword [esp + 0x10]
call fcn.00416cf0
mov eax, dword [esp + 0x10]
push eax
call fcn.00445960
mov ecx, dword [0x459814]
add esp, 4
add ecx, 0x494
push esi
call fcn.00417040
mov edx, dword [esi + 4]
push edx
call fcn.00417f70
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0x5c]
push eax
push ecx
call fcn.004174e0
add esp, 0xc
mov ecx, 0x459e40
push esi
call fcn.0043ae90
mov edx, dword [ebp + 0x5c]
mov dword [edx + 0x10], ebp
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x30]
inc eax
add edx, 0x60
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
jb 0x40d98b
push edi
call fcn.0044642e
add esp, 4
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x4c]
push eax
push esi
call dword [0x452064]
test eax, eax
je 0x40dd17
jmp 0x40d7ac
mov ecx, dword [0x4595e0]
push edi
mov dword [ecx + 0x140], 1
call fcn.0044642e
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [0x452060]
xor eax, eax
jmp 0x40dd23
mov eax, dword [0x4595e0]
push edi
mov dword [eax + 0x140], 1
call fcn.0044642e
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call dword [0x452060]
xor eax, eax
jmp 0x40dd23
push edi
call fcn.0044642e
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [0x452060]
jmp 0x40dcff
push ebx
mov ecx, 0x459e40
call fcn.0043ae90
push edi
call fcn.0044642e
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call dword [0x452060]
jmp 0x40dcff
push edi
call fcn.0044642e
mov ecx, dword [esp + 0x18]
add esp, 4
push ecx
call dword [0x452060]
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40dd13
mov ecx, esi
call fcn.00416cf0
push esi
call fcn.00445960
add esp, 4
xor eax, eax
jmp 0x40dd23
push esi
call dword [0x452060]
mov eax, 1
mov ecx, dword [esp + 0x18c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x188
ret