Function at 0x1001c774
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54c
push edi
mov dword [ebp - 0x54c], ecx
mov byte [ebp - 0x328], 0
mov ecx, 0x45
xor eax, eax
lea edi, [ebp - 0x327]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x534], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x533]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x210], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x20f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x104
lea eax, [ebp - 0x534]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1001c7ee
xor eax, eax
jmp 0x1001ca28
push 0x5c
lea ecx, [ebp - 0x534]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x1001c80f
mov edx, dword [ebp - 8]
mov byte [edx], 0
lea eax, [ebp - 0x534]
push eax
push str._sUI0001.dat
push 0x207
lea ecx, [ebp - 0x210]
push ecx
call fcn.10003120
add esp, 0x10
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x538], 0xffffffff
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 1
push connect
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x538], eax
cmp dword [ebp - 0x538], 0xffffffff
je 0x1001c93b
push 0
mov eax, dword [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
mov dword [ebp - 0x53c], 0
cmp dword [ebp - 4], 0xffffffff
je 0x1001c92e
cmp dword [ebp - 4], 0x1000
jne 0x1001c92e
push 0
lea ecx, [ebp - 0x53c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x54c]
add eax, 0x30
push eax
mov ecx, dword [ebp - 0x538]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001c92e
mov dword [ebp - 0x540], 0
jmp 0x1001c8ef
mov edx, dword [ebp - 0x540]
add edx, 1
mov dword [ebp - 0x540], edx
mov eax, dword [ebp - 4]
shr eax, 2
cmp dword [ebp - 0x540], eax
jae 0x1001c924
mov ecx, dword [ebp - 0x540]
mov edx, dword [ebp - 0x54c]
mov eax, dword [edx + ecx*4 + 0x30]
xor eax, 0x30e958a7
mov ecx, dword [ebp - 0x540]
mov edx, dword [ebp - 0x54c]
mov dword [edx + ecx*4 + 0x30], eax
jmp 0x1001c8e0
mov dword [ebp - 0x32c], 1
mov eax, dword [ebp - 0x538]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x32c], 0
jne 0x1001c94b
xor eax, eax
jmp 0x1001ca28
mov ecx, dword [ebp - 0x54c]
cmp dword [ecx + 0x30], 0x132dcc2
jne 0x1001ca26
mov dword [ebp - 0x544], 0
mov dword [ebp - 0x548], 0
jmp 0x1001c983
mov edx, dword [ebp - 0x548]
add edx, 1
mov dword [ebp - 0x548], edx
mov eax, dword [ebp - 0x54c]
mov ecx, dword [ebp - 0x548]
cmp ecx, dword [eax + 0x3c]
jae 0x1001ca26
push 0x118
push 0
lea edx, [ebp - 0x328]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x544]
mov ecx, dword [ebp - 0x54c]
lea edx, [ecx + eax + 0x40]
push edx
push 0x101062b4
push 0x104
lea eax, [ebp - 0x328]
push eax
call fcn.10003120
add esp, 0x10
lea ecx, [ebp - 0x328]
push ecx
mov ecx, dword [ebp - 0x54c]
call fcn.1001be02
mov edx, dword [ebp - 0x544]
mov eax, dword [ebp - 0x54c]
lea ecx, [eax + edx + 0x40]
push ecx
call sub.MSVCRT.dll_strlen
add esp, 4
mov edx, dword [ebp - 0x544]
lea eax, [edx + eax + 1]
mov dword [ebp - 0x544], eax
cmp dword [ebp - 0x544], 0xff0
jb 0x1001ca21
jmp 0x1001ca26
jmp 0x1001c974
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret