Function at 0x41cf50
Capabilities:
Check if file exists
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc5c
mov eax, dword [0x479a50]
push ebx
mov ebx, ecx
mov dword [esp + 0xc5c], eax
mov eax, dword [ebx + 4]
test eax, eax
push esi
push edi
je 0x41d10b
mov al, byte [ebp + 0xc]
test al, al
mov esi, dword [ebp + 8]
jne 0x41cf98
push 0x46281c
push esi
call fcn.0043c3c0
add esp, 8
cmp eax, esi
je 0x41d10b
push 0x3a
push esi
call fcn.00439cb0
add esp, 8
test eax, eax
push esi
lea eax, [esp + 0x15c]
push eax
setne byte [esp + 0x1b]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x158]
push ecx
mov ecx, ebx
call fcn.0041cdf0
xor eax, eax
mov byte [esp + 0x50], 0
mov ecx, 0x40
lea edi, [esp + 0x51]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [ebp + 0xc]
test al, al
je 0x41d021
lea edx, [esp + 0x260]
push edx
lea eax, [esp + 0x364]
push eax
push 0
push 0
push esi
call fcn.0043bd5d
lea ecx, [esp + 0x274]
push ecx
lea edx, [esp + 0x378]
push edx
push 0
lea eax, [esp + 0x70]
push 0
push eax
call fcn.0043bccd
add esp, 0x28
jmp 0x41d07b
mov al, byte [esp + 0x13]
test al, al
je 0x41d052
lea edi, [ebx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push esi
call fcn.0043a1f9
add esp, 0xc
test eax, eax
jne 0x41d10b
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
push eax
jmp 0x41d070
push 0x462818
push esi
call fcn.0043c3c0
add esp, 8
cmp eax, esi
jne 0x41d06f
lea edx, [esi + 2]
push edx
lea eax, [esp + 0x54]
push eax
jmp 0x41d075
push esi
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x50]
push edx
mov ecx, ebx
call fcn.0041cd60
xor edi, edi
push esi
mov dword [esp + 0x4c], edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0xfffffffe
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x15c]
push ecx
mov ecx, ebx
call fcn.0041ce60
movzx edx, word [esp + 0x1c]
movzx eax, word [esp + 0x1e]
movzx ecx, word [esp + 0x22]
push edi
push 1
push 3
mov dword [esp + 0x4c], edx
movzx edx, word [esp + 0x30]
push edi
dec eax
push edi
mov dword [esp + 0x50], eax
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x4c], ecx
movzx ecx, word [esp + 0x3c]
mov dword [esp + 0x48], edx
push SysReAllocString
lea edx, [esp + 0x170]
push edx
mov dword [esp + 0x60], edi
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41d122
xor al, al
mov ecx, dword [esp + 0xc64]
call fcn.00438707
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebx + 4]
push 0xffffffffffffffff
push 8
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x70]
push ecx
push edx
call fcn.0042a810
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x41d1bb
inc dword [ebx + 0x110]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
lea esp, [esp]
push 0
lea eax, [esp + 0x1c]
push eax
push 0x800
lea ecx, [esp + 0x46c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41d1a9
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
add edx, eax
test eax, eax
mov dword [esp + 0x14], edx
je 0x41d1a9
push eax
mov eax, dword [ebx + 4]
lea edx, [esp + 0x464]
push edx
push eax
call fcn.0042a850
mov esi, eax
test esi, esi
je 0x41d160
mov eax, dword [ebx + 0x118]
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [ebx + 0x118], eax
mov edx, dword [ebx + 4]
push edx
call fcn.0042ac40
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xc64]
xor eax, eax
test esi, esi
sete al
call fcn.00438707
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8