Function at 0x4598e0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
mov eax, dword [0x6340c4]
xor eax, esp
mov dword [esp + 0x218], eax
mov eax, edx
push ebx
push esi
lea esi, [esp + 0x14]
mov dword [esp + 0x10], eax
mov dword [eax], 0
mov eax, esi
push edi
mov edi, 0x104
sub ecx, eax
lea eax, [edi + 0x7ffffefa]
test eax, eax
je 0x459934
movzx eax, word [ecx + esi]
test ax, ax
je 0x459934
mov word [esi], ax
add esi, 2
sub edi, 1
jne 0x459916
test edi, edi
lea eax, [esi - 2]
push 0x5dcd98
cmovne eax, esi
xor ecx, ecx
mov word [eax], cx
lea ecx, [esp + 0x1c]
call fcn.004501e0
lea eax, [esp + 0x18]
push eax
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenSemaphoreW]
mov esi, eax
test esi, esi
jne 0x4599d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x459991
xor ebx, ebx
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x218]
xor ecx, esp
call fcn.004c59c5
mov esp, ebp
pop ebp
ret
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0xc9
call fcn.00451e00
add esp, 4
mov edi, eax
xor ebx, ebx
test edi, edi
jns 0x459974
push edi
push ecx
mov ecx, dword [ebp + 4]
lea edx, [ebx + 0x62]
call fcn.00451db0
mov ecx, dword [esp + 0x22c]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c59c5
mov esp, ebp
pop ebp
ret
xor ebx, ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x4599ea
mov edx, 0x95
jmp 0x459aaa
test eax, eax
je 0x4599ff
cmp eax, 0x102
je 0x4599ff
mov edx, 0x96
jmp 0x459ae2
mov dword [esp + 0xc], ebx
test eax, eax
jne 0x459a51
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x459a23
mov edx, 0x9e
jmp 0x459aaa
inc dword [esp + 0xc]
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x459a47
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
je 0x459ac9
mov edx, 0xa3
jmp 0x459ae2
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
push eax
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x459a6e
mov edx, 0xad
jmp 0x459aaa
cmp dword [esp + 0x10], ebx
je 0x459a7b
mov edx, 0xae
jmp 0x459ae2
push 0
push 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
jne 0x459add
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12a
jne 0x459add
push 0
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x459abe
mov edx, 0xb4
push ecx
mov ecx, dword [ebp + 4]
call fcn.00451e00
mov edi, eax
add esp, 4
test edi, edi
jns 0x459acd
jmp 0x459af8
test eax, eax
je 0x459ac9
mov edx, 0xb5
jmp 0x459ae2
mov ebx, dword [esp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x459b27
jmp 0x459974
mov edx, 0xb1
push 0x8000ffff
push ecx
mov ecx, dword [ebp + 4]
call fcn.00451db0
add esp, 8
mov edi, 0x8000ffff
push edi
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0xcf
call fcn.00451db0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4599a4
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0x942
call fcn.00451e50
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0x942
call fcn.00451e50
int3