Function at 0x1004c300
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100a0c88
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x100d1040]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x100d1040]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
cmp dword [ebx + 0x38], 8
jb 0x1004c345
mov eax, dword [ebx + 0x24]
jmp 0x1004c348
lea eax, [ebx + 0x24]
xor esi, esi
push esi
push esi
push 4
push esi
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x50], esi
cmp edi, 0xffffffff
jne 0x1004c376
call fcn.10002c20
jmp 0x1004c52f
lea eax, [esp + 0x1c]
push eax
push edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1004c3a3
call fcn.10002c20
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x1004c52f
cmp dword [esp + 0x20], esi
mov eax, dword [esp + 0x1c]
jl 0x1004c3c7
jg 0x1004c3b6
cmp eax, 0x100000
jbe 0x1004c3c7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x1004c52f
add eax, 0x200
push 0x100d61b4
push eax
call fcn.10057582
mov esi, eax
add esp, 8
mov dword [esp + 0x10], esi
mov byte [esp + 0x50], 1
test esi, esi
jne 0x1004c3fa
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x1004c52f
mov ecx, dword [esp + 0x1c]
add ecx, 0x200
push ecx
push 0
push esi
call fcn.10059a00
mov eax, dword [esp + 0x28]
add esp, 0xc
push 0
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push edi
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004c450
call fcn.10002c20
mov edi, eax
lea esi, [esp + 0x10]
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, edi
jmp 0x1004c52f
cmp dword [esp + 0x18], 0
jne 0x1004c473
lea esi, [esp + 0x10]
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, 0x80004005
jmp 0x1004c52f
push esi
lea ecx, [esp + 0x28]
call fcn.10002110
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [esp + 0x28]
mov ecx, ebx
mov byte [esp + 0x54], 2
call fcn.1004c700
mov ebx, eax
test ebx, ebx
jl 0x1004c512
cmp ebx, 1
je 0x1004c512
xor ecx, ecx
push ecx
push ecx
push ecx
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x1004c4c4
call fcn.10002c20
lea ecx, [esp + 0x24]
mov edi, eax
call fcn.10002150
jmp 0x1004c437
cmp dword [esp + 0x3c], 0x10
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], 0
jae 0x1004c4db
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x38]
push 0
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004c4af
lea ecx, [esp + 0x24]
call fcn.10002150
lea esi, [esp + 0x10]
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
xor eax, eax
jmp 0x1004c52f
lea ecx, [esp + 0x24]
call fcn.10002150
lea esi, [esp + 0x10]
call fcn.1004b720
lea esi, [esp + 0x14]
call fcn.1000fcc0
mov eax, ebx
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.1005710f
mov esp, ebp
pop ebp
ret 8