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

Disassembly:
push ebp
lea ebp, [esp - 0x64]
sub esp, 0x64
push 0xffffffffffffffff
push 0x4e4480
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
mov eax, dword [ebp + 0x6c]
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push closesocket
push eax
mov dword [ebp + 0x5c], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x58], ebx
mov dword [ebp - 4], edi
cmp ebx, 0xffffffff
jne 0x42be97
mov dword [ebp - 4], eax
push eax
jmp 0x42c11f
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [ebp + 0x1c]
mov esi, eax
call fcn.00421900
mov byte [ebp - 4], 1
push edi
lea ecx, [esi + 1]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.004332d0
mov dword [ebp + 0x54], 0xf
mov dword [ebp + 0x50], edi
mov byte [ebp + 0x40], 0
mov byte [ebp - 4], 2
mov edx, dword [ebp + 0x2c]
sub edx, dword [ebp + 0x28]
mov dword [ebp + 0x38], edi
jne 0x42bedc
call fcn.0047a3ff
mov ecx, dword [ebp + 0x28]
push edi
lea eax, [ebp + 0x38]
push eax
push esi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42c0e3
cmp dword [ebp + 0x38], esi
jne 0x42c0e3
mov edx, dword [ebp + 0x2c]
sub edx, dword [ebp + 0x28]
cmp esi, edx
jb 0x42bf0d
call fcn.0047a3ff
mov edi, dword [ebp + 0x70]
mov eax, dword [ebp + 0x28]
mov byte [eax + esi], 0
test edi, edi
je 0x42bf46
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x42bf2e
xor edi, edi
jmp 0x42bf46
lea esi, [eax + eax]
mov eax, esi
call fcn.0047af70
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.0040b400
mov edi, eax
mov ecx, dword [ebp + 0x2c]
mov edx, dword [ebp + 0x28]
xor eax, eax
sub ecx, edx
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x70], eax
jne 0x42bf60
call fcn.0047a3ff
mov edx, dword [ebp + 0x28]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x42bf65
sub eax, esi
push eax
push edx
lea ecx, [ebp + 0x3c]
call fcn.00402630
mov esi, dword [ebp + 0x5c]
lea edx, [ebp + 0x70]
push edx
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x3c]
push ecx
mov ecx, esi
call fcn.0042b500
test eax, eax
je 0x42bfad
push edi
lea edx, [ebp + 0x70]
push edx
lea eax, [ebp + 0x60]
push eax
lea ecx, [ebp + 0x3c]
push ecx
mov ecx, esi
call fcn.0042b750
mov esi, eax
jmp 0x42c06c
mov eax, dword [ebp + 0x50]
test eax, eax
je 0x42bffd
lea esi, [eax - 1]
push esi
lea ecx, [ebp + 0x3c]
call fcn.0042af30
cmp byte [eax], 0xd
je 0x42bffd
push esi
lea ecx, [ebp + 0x3c]
call fcn.0042af30
cmp byte [eax], 0xa
je 0x42bffd
push 0x4eacb8
lea ecx, [ebp]
call fcn.00402d70
mov byte [ebp - 4], 3
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp + 0x3c]
call fcn.0040bf30
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.00402010
push str.user_pref__general.useragent.extra.MRA____
lea ecx, [ebp - 0x44]
call fcn.00402d70
mov bl, 4
mov byte [ebp - 4], bl
push edi
push eax
lea edx, [ebp - 0x28]
push edx
call fcn.0042b8b0
mov byte [ebp - 4], 5
push 0x4eee40
push eax
lea eax, [ebp]
push eax
call fcn.0042b8b0
add esp, 0x18
mov byte [ebp - 4], 6
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp + 0x3c]
call fcn.0040bf30
mov byte [ebp - 4], 5
lea ecx, [ebp]
call fcn.00402010
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x28]
call fcn.00402010
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x44]
call fcn.00402010
mov ebx, dword [ebp + 0x34]
mov esi, 1
push edi
lea ecx, [ebp + 0x70]
push ecx
mov ecx, dword [ebp + 0x5c]
lea edx, [ebp + 0x60]
push edx
lea eax, [ebp + 0x3c]
push eax
call fcn.0042b980
test eax, eax
jne 0x42c089
test esi, esi
je 0x42c0e1
mov ecx, dword [ebp + 0x6c]
xor edi, edi
push edi
push edi
push 5
push edi
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp + 0x70], esi
mov byte [ebp - 4], 7
cmp esi, 0xffffffff
je 0x42c0cf
cmp dword [ebp + 0x54], 0x10
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x6c], edi
jae 0x42c0be
lea eax, [ebp + 0x40]
mov ecx, dword [ebp + 0x50]
push edi
lea edx, [ebp + 0x6c]
push edx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 4], 2
cmp esi, edi
je 0x42c0e1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x70], edi
xor edi, edi
mov byte [ebp - 4], 1
cmp dword [ebp + 0x54], 0x10
jb 0x42c0f9
mov edx, dword [ebp + 0x40]
push edx
call fcn.0045d8c9
add esp, 4
mov dword [ebp + 0x54], 0xf
mov dword [ebp + 0x50], edi
mov byte [ebp + 0x40], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x1c]
call fcn.0041c810
mov dword [ebp - 4], 0xffffffff
cmp ebx, edi
je 0x42c128
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x58], edi
lea esp, [ebp - 0x50]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
add ebp, 0x64
mov esp, ebp
pop ebp
ret 8