Function at 0x510840
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x24
call fcn.00498090
mov eax, dword [0x61c850]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov eax, esi
push edi
mov dword [ebp - 0x18], esi
lea ecx, [eax + 1]
jmp 0x510870
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x510870
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
sub eax, ecx
lea edi, [eax + 1]
push edi
push esi
push 8
push 0xfde9
mov dword [ebp - 0x20], 8
call ebx
mov esi, eax
test esi, esi
jg 0x5108ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3ec
jne 0x5108cc
mov ecx, dword [ebp - 0x18]
push 0
push 0
push edi
push ecx
push 0
push 0xfde9
mov dword [ebp - 0x20], 0
call ebx
mov esi, eax
test esi, esi
jg 0x5108ea
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
jne 0x510980
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
push edx
push eax
jmp 0x51096e
lea eax, [esi + esi]
call fcn.004a8090
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov eax, esp
push esi
push eax
push edi
push ecx
push edx
push 0xfde9
mov dword [ebp - 0x24], eax
call ebx
test eax, eax
je 0x510980
mov esi, dword [ebp - 0x1c]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x510915
push 8
sub eax, edx
lea ecx, [ebp - 0x14]
push ecx
add eax, 1
push eax
push esi
push 0
push 0xfde9
call ebx
test eax, eax
je 0x510980
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x14]
push edx
push eax
call fcn.004987eb
mov esi, eax
add esp, 8
test esi, esi
jne 0x510a24
call fcn.0049bc08
cmp dword [eax], 2
je 0x510966
call fcn.0049bc08
cmp dword [eax], 9
jne 0x510978
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
push ecx
push edx
call fcn.0049aac6
mov esi, eax
add esp, 8
test esi, esi
jne 0x510a24
push 0xa9
push str..crypto_bio_bss_file.c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 1
push 2
call fcn.004f2790
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push 0x5c5280
push eax
push 0x5d511c
push ecx
push str.fopen_
push 5
call fcn.004f2ab0
add esp, 0x2c
call fcn.0049bc08
cmp dword [eax], 2
jne 0x5109f6
push 0xac
push str..crypto_bio_bss_file.c
push 0x80
push 0x6d
push 0x20
call fcn.004f2790
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493f9c
mov esp, ebp
pop ebp
ret
push 0xae
push str..crypto_bio_bss_file.c
push 2
push 0x6d
push 0x20
call fcn.004f2790
add esp, 0x14
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493f9c
mov esp, ebp
pop ebp
ret
push 0x61ead0
call fcn.004ee880
mov edi, eax
add esp, 4
test edi, edi
jne 0x510a56
push esi
call fcn.0049834c
add esp, 4
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493f9c
mov esp, ebp
pop ebp
ret
push 0
push edi
call fcn.004ee2b0
push esi
push 1
push 0x6a
push edi
call fcn.004ee610
add esp, 0x18
mov eax, edi
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00493f9c
mov esp, ebp
pop ebp
ret