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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4e44a0
push eax
mov dword fs:[0], esp
mov eax, dword [esp + 0x10]
sub esp, 0x40
push ebx
push ebp
push edi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push 1
push closesocket
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x42c392
push esi
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [esp + 0x1c]
mov esi, eax
call fcn.00421900
mov dword [esp + 0x58], ebx
push ebx
lea ecx, [esi + 1]
push ecx
lea ecx, [esp + 0x24]
call fcn.004332d0
mov dword [esp + 0x4c], 0xf
mov dword [esp + 0x48], ebx
mov byte [esp + 0x38], bl
mov byte [esp + 0x58], 1
mov edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x28]
mov dword [esp + 0x10], ebx
jne 0x42c1df
call fcn.0047a3ff
mov ecx, dword [esp + 0x28]
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42c349
cmp dword [esp + 0x10], esi
jne 0x42c349
mov edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x28]
cmp esi, edx
jb 0x42c215
call fcn.0047a3ff
mov eax, dword [esp + 0x28]
mov byte [eax + esi], bl
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
sub ecx, edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
jne 0x42c239
call fcn.0047a3ff
mov edx, dword [esp + 0x28]
mov eax, edx
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x42c240
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x3c]
call fcn.00402630
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x3c]
push ecx
mov ecx, edi
call fcn.0042b500
test eax, eax
je 0x42c349
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x48]
cmp esi, ecx
jae 0x42c2e9
jbe 0x42c289
call fcn.0047a3ff
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
mov edi, 0x10
cmp dword [esp + 0x4c], edi
jae 0x42c29c
lea eax, [esp + 0x38]
cmp byte [eax + esi], 0xd
je 0x42c2e4
cmp esi, ecx
jbe 0x42c2af
call fcn.0047a3ff
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x4c], edi
jae 0x42c2bd
lea eax, [esp + 0x38]
cmp byte [eax + esi], 0xa
je 0x42c2e4
cmp esi, ecx
jbe 0x42c2d0
call fcn.0047a3ff
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x4c], edi
jae 0x42c2de
lea eax, [esp + 0x38]
cmp byte [eax + esi], 0x3b
jne 0x42c2ee
inc esi
cmp esi, ecx
jb 0x42c289
mov edi, 0x10
mov eax, dword [esp + 0x18]
sub esi, eax
push esi
push eax
lea ecx, [esp + 0x3c]
call fcn.00401d50
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x60]
push ebx
push ebx
push 5
push ebx
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x42c34e
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x60], ebx
cmp dword [esp + 0x4c], edi
jae 0x42c334
lea ecx, [esp + 0x38]
push ebx
lea edx, [esp + 0x64]
push edx
mov edx, dword [esp + 0x50]
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x42c34e
mov edi, 0x10
pop esi
cmp ebp, ebx
je 0x42c35a
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x54], bl
cmp dword [esp + 0x48], edi
jb 0x42c371
mov eax, dword [esp + 0x34]
push eax
call fcn.0045d8c9
add esp, 4
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], bl
mov dword [esp + 0x54], 0xffffffff
lea ecx, [esp + 0x18]
call fcn.0041c810
mov ecx, dword [esp + 0x4c]
pop edi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x4c
ret 4