Function at 0x4210c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 4], 8
mov dword [esp], 0xfde9
lea edi, [eax + 1]
mov dword [esp + 0xc], edi
call esi
mov ecx, 8
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x421202
lea eax, [edx + edx + 0x1e]
and eax, 0xfffffff0
call fcn.004b12b0
sub esp, eax
lea eax, [esp + 0x27]
mov dword [ebp - 0x2c], eax
and dword [ebp - 0x2c], 0xfffffff0
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], ecx
mov dword [esp], 0xfde9
call esi
sub esp, 0x18
test eax, eax
jne 0x421240
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ecx
mov dword [esp + 0x10], 0xa9
mov dword [esp + 0xc], 0x4c7820
mov dword [esp + 4], 1
mov dword [esp], 2
mov dword [esp + 8], eax
call fcn.00429970
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0x4c7847
mov dword [esp + 0xc], 0x4c784a
mov dword [esp + 8], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 4], str.fopen_
mov dword [esp], 5
call fcn.00429fc0
call edi
cmp dword [eax], 2
je 0x421336
mov dword [esp + 0x10], 0xae
mov dword [esp + 0xc], 0x4c7820
mov dword [esp + 8], 2
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.00429970
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], ecx
call ecx
mov ecx, dword [ebp - 0x2c]
cmp eax, 0x3ec
je 0x4212f6
mov dword [ebp - 0x2c], ecx
call ecx
cmp eax, 0x459
je 0x421380
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [ebp - 0x2c]
jmp 0x421168
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea edx, [ebp - 0x28]
mov dword [esp + 0x10], edx
mov dword [ebp - 0x30], edx
mov dword [esp + 0x14], 8
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
add eax, 1
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
call esi
mov edi, dword [sym.imp.msvcrt.dll__errno]
mov edx, dword [ebp - 0x30]
sub esp, 0x18
test eax, eax
je 0x421162
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__wfopen]
test eax, eax
mov esi, eax
je 0x421369
mov dword [esp], 0x4be4a0
call fcn.004223d0
test eax, eax
mov ebx, eax
je 0x4213b0
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.00422530
mov dword [esp + 0xc], esi
mov dword [esp], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 0x6a
call fcn.00422a90
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call esi
mov ecx, dword [ebp - 0x2c]
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x42121b
xor ecx, ecx
jmp 0x421118
mov dword [esp + 0x10], 0xac
mov dword [esp + 0xc], 0x4c7820
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], 0x6d
mov dword [esp], 0x20
call fcn.00429970
xor eax, eax
jmp 0x4211fa
call edi
cmp dword [eax], 2
nop
je 0x421380
call edi
cmp dword [eax], 9
jne 0x421162
lea esi, [esi]
mov eax, dword [ebp + 0xc]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
jne 0x4212aa
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.msvcrt.dll__errno]
jmp 0x421168
mov dword [esp], esi
call sub.msvcrt.dll_fclose
xor eax, eax
jmp 0x4211fa