Function at 0x40e430
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x4b0e44
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
push ebx
push esi
push edi
mov eax, dword [0x4ca1d0]
xor eax, esp
push eax
lea eax, [esp + 0xf8]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x5c], esi
cmp dword [ebp + 8], 0xffffffff
je 0x40ea73
lea eax, [esi + 0x318]
push eax
mov dword [esp + 0x58], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [esp + 0x58], 1
mov eax, dword [0x4d3dfc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dfc
mov dword [esp + 0x100], 0
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov eax, dword [0x4d3dfc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dfc
mov byte [esp + 0x100], 1
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
lea eax, [ebp + 8]
push eax
lea ecx, [esp + 0x44]
lea edi, [esi + 0x2bc]
push ecx
mov ecx, edi
mov byte [esp + 0x108], 2
call fcn.004084d0
mov ebx, dword [edi + 0x18]
mov eax, dword [edi]
mov edi, dword [esp + 0x40]
test edi, edi
je 0x40e4f6
cmp edi, eax
je 0x40e4fb
call fcn.004948d8
cmp dword [esp + 0x44], ebx
je 0x40e66a
test edi, edi
jne 0x40e663
call fcn.004948d8
mov edx, dword [esp + 0x44]
cmp edx, dword [edi + 0x18]
jne 0x40e520
call fcn.004948d8
mov ecx, dword [esp + 0x44]
mov ecx, dword [ecx + 0x10]
lea eax, [esp + 0x28]
push eax
call fcn.00414150
mov edx, dword [eax]
cmp dword [edx - 0xc], 0
mov eax, dword [esp + 0x28]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e55a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x40e642
mov ebx, dword [ebp + 8]
lea ecx, [esp + 0x2c]
push ebx
push ecx
call fcn.0040de00
add esp, 8
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x104], 3
call fcn.0040a5d0
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x100], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e5ad
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x18]
push edi
lea ecx, [esp + 0x44]
call fcn.00407a50
mov ecx, dword [eax + 4]
call fcn.004170e0
lea ecx, [esp + 0x24]
push edi
push ecx
call fcn.0040cc50
add esp, 8
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x104], 4
call fcn.00407a50
mov ecx, dword [eax + 4]
call fcn.00417120
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x100], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e615
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x18]
call fcn.00408370
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esi + 0x2dc]
call fcn.0040d850
push ebx
lea ecx, [esp + 0x44]
mov dword [eax], ebx
call fcn.00407a50
mov ecx, dword [eax + 4]
call fcn.00417900
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x100], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40ea34
mov edi, dword [edi]
jmp 0x40e512
mov edx, dword [ebp + 8]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.0040de00
add esp, 8
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x104], 5
call fcn.0040a5d0
mov eax, dword [esp + 0x60]
add eax, 0xfffffff0
mov byte [esp + 0x100], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e6b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x54]
push edx
call fcn.0040cc50
add esp, 8
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x104], 6
call fcn.0040a5d0
mov eax, dword [esp + 0x50]
add eax, 0xfffffff0
mov byte [esp + 0x100], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e701
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x188
call fcn.00494903
add esp, 4
mov dword [esp + 0x3c], eax
mov byte [esp + 0x100], 7
test eax, eax
je 0x40e729
mov ecx, eax
call fcn.004195b0
mov edi, eax
jmp 0x40e72b
xor edi, edi
push 8
mov byte [esp + 0x104], 2
call fcn.00494903
add esp, 4
mov dword [esp + 0x3c], eax
mov byte [esp + 0x100], 8
test eax, eax
je 0x40e758
mov ecx, eax
call fcn.00413c90
mov ebx, eax
jmp 0x40e75a
xor ebx, ebx
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0x20]
push edx
mov ecx, esi
mov byte [esp + 0x108], 2
mov dword [esp + 0x44], ebx
call fcn.0040b900
mov eax, dword [esp + 0x1c]
push eax
mov byte [esp + 0x104], 9
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40e7a2
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, edi
call fcn.00419af0
mov edx, dword [esp + 0x1c]
push 0
push edx
jmp 0x40e7a9
mov eax, dword [esp + 0x1c]
push 1
push eax
mov ecx, ebx
call fcn.004172b0
push ebx
mov ecx, edi
call fcn.00412cf0
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, edi
call fcn.004170e0
mov edx, dword [esp + 0x20]
push edx
mov ecx, edi
call fcn.00417120
mov eax, dword [ebp + 8]
push eax
mov ecx, edi
call fcn.00417900
test esi, esi
je 0x40e7e7
lea eax, [esi + 0x270]
jmp 0x40e7e9
xor eax, eax
push edi
push eax
mov ecx, edi
call fcn.00412d20
lea ecx, [esp + 0x30]
push ecx
call fcn.00407ce0
cmp dword [esp + 0x38], 0
jne 0x40e827
fld qword [esp + 0x30]
lea edx, [esp + 0x64]
push edx
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e827
movzx eax, word [esp + 0x70]
mov dword [esp + 0x48], eax
jmp 0x40e82f
mov dword [esp + 0x48], 0xffffffff
cmp dword [esp + 0x38], 0
jne 0x40e860
fld qword [esp + 0x30]
lea ecx, [esp + 0x84]
push ecx
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e860
movzx edx, word [esp + 0x8e]
mov dword [esp + 0x4c], edx
jmp 0x40e868
mov dword [esp + 0x4c], 0xffffffff
cmp dword [esp + 0x38], 0
jne 0x40e899
fld qword [esp + 0x30]
lea eax, [esp + 0xa4]
push eax
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e899
movzx ecx, word [esp + 0xac]
mov dword [esp + 0x24], ecx
jmp 0x40e8a1
mov dword [esp + 0x24], 0xffffffff
cmp dword [esp + 0x38], 0
jne 0x40e8cc
fld qword [esp + 0x30]
lea edx, [esp + 0x74]
push edx
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e8cc
movzx eax, word [esp + 0x7a]
mov dword [esp + 0x2c], eax
jmp 0x40e8d4
mov dword [esp + 0x2c], 0xffffffff
cmp dword [esp + 0x38], 0
jne 0x40e905
fld qword [esp + 0x30]
lea ecx, [esp + 0x94]
push ecx
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e905
movzx edx, word [esp + 0x96]
mov dword [esp + 0x28], edx
jmp 0x40e90d
mov dword [esp + 0x28], 0xffffffff
cmp dword [esp + 0x38], 0
jne 0x40e93a
fld qword [esp + 0x30]
lea eax, [esp + 0xb4]
push eax
sub esp, 8
fstp qword [esp]
call dword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x40e93a
movzx eax, word [esp + 0xb4]
jmp 0x40e93d
or eax, 0xffffffff
mov edx, dword [esp + 0x20]
push edx
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebx]
push edx
mov edx, dword [esp + 0x50]
push edx
mov edx, dword [esp + 0x58]
push edx
mov edx, dword [esp + 0x34]
push edx
mov edx, dword [esp + 0x40]
push edx
mov edx, dword [esp + 0x40]
push edx
push eax
mov eax, dword [ecx + 4]
push str.Begin_Log___d__d__d__d:_d:_d___s__s
push ebx
call eax
add esp, 0x28
cmp dword [esi + 0x2d8], 0
jne 0x40e983
push 1
mov ecx, edi
call fcn.004133b0
lea ecx, [ebp + 8]
push ecx
lea ecx, [esi + 0x2bc]
call fcn.0040d950
lea ecx, [esp + 0x18]
mov dword [eax], edi
call fcn.00408370
lea edx, [esp + 0x18]
push edx
lea ecx, [esi + 0x2dc]
call fcn.0040d850
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
mov edi, dword [esi + 0x310]
mov eax, dword [edi + 4]
add esi, 0x2fc
lea edx, [esp + 0x3c]
push edx
push eax
push edi
mov ecx, esi
call fcn.00407ba0
push 1
mov ecx, esi
mov ebx, eax
call fcn.0040ade0
mov ecx, dword [esp + 0x5c]
mov dword [edi + 4], ebx
mov eax, dword [ebx + 4]
mov dword [eax], ebx
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [ecx + 0x3c8], 1
mov byte [esp + 0x100], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ea18
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x100], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea40
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x100], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea68
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xf8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4