Function at 0x100871c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
push esi
push edi
lea edi, [ebp - 0x140]
mov ecx, 0x50
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x1019a984]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x134], eax
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x138], ecx
mov edx, dword [ebp - 0x134]
mov al, byte [edx]
mov byte [ebp - 0x139], al
add dword [ebp - 0x134], 1
cmp byte [ebp - 0x139], 0
jne 0x1008720e
mov ecx, dword [ebp - 0x134]
sub ecx, dword [ebp - 0x138]
mov dword [ebp - 0x140], ecx
mov edx, dword [ebp - 0x140]
add edx, 1
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x3c], 8
mov esi, esp
push 0
push 0
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp esi, esp
call fcn.101354d4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jg 0x100872d0
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.101354d4
cmp eax, 0x3ec
jne 0x100873fc
mov dword [ebp - 0x3c], 0
mov esi, esp
push 0
push 0
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp esi, esp
call fcn.101354d4
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jle 0x100873fc
mov eax, dword [ebp - 0x24]
shl eax, 1
add eax, 0x24
mov dword [ebp - 0x134], eax
mov eax, dword [ebp - 0x134]
call fcn.10137040
mov dword [ebp - 0x138], esp
lea ecx, [ebp - 0x6c]
push ecx
mov edx, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x138]
call fcn.10135553
add dword [ebp - 0x138], 0x20
mov edx, dword [ebp - 0x138]
mov dword [ebp - 0x60], edx
mov esi, esp
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp esi, esp
call fcn.101354d4
test eax, eax
je 0x100873fa
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x134], eax
mov ecx, dword [ebp - 0x134]
add ecx, 1
mov dword [ebp - 0x138], ecx
mov edx, dword [ebp - 0x134]
mov al, byte [edx]
mov byte [ebp - 0x139], al
add dword [ebp - 0x134], 1
cmp byte [ebp - 0x139], 0
jne 0x1008735c
mov ecx, dword [ebp - 0x134]
sub ecx, dword [ebp - 0x138]
mov dword [ebp - 0x140], ecx
mov esi, esp
push 8
lea edx, [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x140]
add eax, 1
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp esi, esp
call fcn.101354d4
test eax, eax
je 0x100873fa
lea eax, [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
call fcn.1013879e
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x100873fa
call fcn.1013868f
cmp dword [eax], 2
je 0x100873e7
call fcn.1013868f
cmp dword [eax], 9
jne 0x100873fa
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.10138636
add esp, 8
mov dword [ebp - 0x18], eax
jmp 0x10087425
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.101354d4
cmp eax, 0x459
jne 0x10087425
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.10138636
add esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x100874c5
mov eax, dword [0x10199a38]
add eax, 0x31
push eax
push 0x1016d50c
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.101354d4
push eax
push 1
push 2
call fcn.10060940
add esp, 0x14
push 0x1016d508
mov eax, dword [ebp + 0xc]
push eax
push 0x1016d504
mov ecx, dword [ebp + 8]
push ecx
push str.fopen_
push 5
call fcn.100617a0
add esp, 0x18
call fcn.1013868f
cmp dword [eax], 2
jne 0x100874a5
mov eax, dword [0x10199a38]
add eax, 0x34
push eax
push 0x1016d50c
push 0x80
push 0x6d
push 0x20
call fcn.10060940
add esp, 0x14
jmp 0x100874c1
mov eax, dword [0x10199a38]
add eax, 0x36
push eax
push 0x1016d50c
push 2
push 0x6d
push 0x20
call fcn.10060940
add esp, 0x14
xor eax, eax
jmp 0x10087514
call fcn.10087580
push eax
call fcn.10054290
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x100874ec
mov eax, dword [ebp - 0x18]
push eax
call fcn.101384f6
add esp, 4
xor eax, eax
jmp 0x10087514
push 0x8000
mov eax, dword [ebp - 0xc]
push eax
call fcn.10054570
add esp, 8
mov eax, dword [ebp - 0x18]
push eax
push 1
push 0x6a
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.10054c70
add esp, 0x10
mov eax, dword [ebp - 0xc]
push edx
mov ecx, ebp
push eax
lea edx, [0x10087540]
push dword [ebp - 0x6c]
call fcn.10135585
pop eax
pop edx
lea esp, [ebp - 0x14c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10135c7b
mov esp, ebp
pop ebp
ret