Function at 0x4b01e0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
push 0x50e4c8
push dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], 0
xor ebx, ebx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x18], esi
call fcn.004b629c
mov edi, eax
add esp, 8
mov dword [ebp - 0x3c], edi
test edi, edi
je 0x4b0257
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4b0261
push 0x4d2d4c
push eax
call fcn.004b629c
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b0261
push edi
call fcn.004b6a9c
add esp, 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4b029f
push 0x4d2d4c
push eax
call fcn.004b629c
mov esi, eax
add esp, 8
mov dword [ebp - 0x18], esi
test esi, esi
jne 0x4b029f
push edi
call fcn.004b6a9c
add esp, 4
test ebx, ebx
je 0x4b0257
push ebx
call fcn.004b6a9c
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 1
lea eax, [ebp - 0x1c]
push 4
push eax
call fcn.004b6984
push edi
push 1
lea eax, [ebp - 0x20]
push 4
push eax
call fcn.004b6984
push edi
push 1
lea eax, [ebp - 0xc]
push 2
push eax
call fcn.004b6984
push edi
push 1
lea eax, [ebp - 0x24]
push 2
push eax
call fcn.004b6984
add esp, 0x40
push dword [ebp - 0x1c]
call sub.WS2_32.dll_ntohl
push dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
call sub.WS2_32.dll_ntohl
push dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
call sub.WS2_32.dll_ntohs
push dword [ebp - 0x24]
movzx eax, ax
mov dword [ebp - 0xc], eax
call sub.WS2_32.dll_ntohs
cmp word [ebp - 0xc], 1
movzx eax, ax
mov dword [ebp - 0x24], eax
jne 0x4b05c5
cmp eax, 4
jne 0x4b05c5
push edi
call fcn.004b98fe
add esp, 4
test eax, eax
jne 0x4b05cc
push edi
push 1
lea eax, [ebp - 1]
mov byte [ebp - 1], 0
push 1
push eax
mov dword [ebp - 0x10], 0
call fcn.004b6984
push edi
push 1
lea eax, [ebp - 0x10]
push 4
push eax
call fcn.004b6984
add esp, 0x20
push dword [ebp - 0x10]
call sub.WS2_32.dll_ntohl
mov esi, eax
push esi
mov dword [ebp - 0x10], esi
call fcn.004b7328
push edi
push 1
push esi
push eax
mov dword [ebp - 0x14], eax
call fcn.004b6984
mov edi, dword [ebp - 0x10]
add esp, 0x14
mov esi, dword [ebp - 0x14]
add edi, esi
cmp byte [ebp - 1], 2
jne 0x4b0581
add esi, 4
mov byte [ebp - 2], 1
cmp esi, edi
ja 0x4b05ab
mov eax, dword [ebp - 0x14]
push dword [eax]
call sub.WS2_32.dll_ntohl
lea eax, [esi + 4]
cmp eax, edi
ja 0x4b05ab
push dword [esi]
call sub.WS2_32.dll_ntohl
lea eax, [esi + 6]
cmp eax, edi
ja 0x4b05ab
movzx eax, word [esi + 4]
push eax
call sub.WS2_32.dll_ntohs
lea eax, [esi + 0xa]
mov dword [ebp - 0x2c], eax
cmp eax, edi
ja 0x4b05ab
push dword [esi + 6]
call sub.WS2_32.dll_ntohl
mov esi, eax
mov eax, dword [ebp - 0x2c]
add eax, esi
mov dword [ebp - 0x34], eax
cmp eax, edi
ja 0x4b05ab
lea ecx, [eax + 1]
cmp ecx, edi
ja 0x4b05ab
lea eax, [ecx + 4]
cmp eax, edi
ja 0x4b05ab
push dword [ecx]
call sub.WS2_32.dll_ntohl
mov ecx, dword [ebp - 0x34]
add ecx, 5
add eax, ecx
cmp eax, edi
jae 0x4b05ab
cmp byte [eax], 0x23
jne 0x4b05ab
lea ecx, [eax + 5]
mov dword [ebp - 0x28], ecx
cmp ecx, edi
ja 0x4b05ab
push dword [eax + 1]
call sub.WS2_32.dll_ntohl
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
lea edx, [eax + ecx]
mov dword [ebp - 8], edx
cmp edx, edi
ja 0x4b05ab
cmp dword [ebp + 0x14], 0
je 0x4b046f
push dword [ebp + 0x18]
push eax
push ecx
call dword [ebp + 0x14]
mov ecx, dword [ebp - 0x28]
add esp, 0xc
mov edx, dword [ebp - 8]
cmp edi, edx
je 0x4b0499
lea eax, [edx + 1]
cmp eax, edi
ja 0x4b05ab
mov al, byte [edx]
cmp al, 0xb2
sete dl
cmp al, 0xb0
mov byte [ebp - 2], dl
sete al
test dl, dl
jne 0x4b0499
test al, al
je 0x4b0581
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0
push SysReAllocStringLen
push dword [ebp - 0x34]
push ecx
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x4b05ab
push dword [ebp - 8]
call fcn.004b7328
mov edi, eax
add esp, 4
test edi, edi
je 0x4b05ab
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 8]
push eax
push edi
push SysReAllocStringLen
push dword [ebp - 0x34]
push ecx
call dword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
test eax, eax
je 0x4b05a2
cmp byte [ebp - 2], 0
je 0x4b0562
test ebx, ebx
je 0x4b0562
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4b055f
cmp dword [ebp - 0x38], 0
jne 0x4b0519
push 0x4d2d50
push ebx
call fcn.004b97ec
mov eax, dword [ebp - 0x2c]
add esp, 8
push eax
push 0x4d2d54
push ebx
mov dword [ebp - 0x38], 0
mov byte [esi + eax], 0
call fcn.004b97ec
add esp, 0xc
test esi, esi
jle 0x4b0551
jmp 0x4b0540
push 0x4d2d58
push ebx
call fcn.004b97ec
add esp, 8
dec esi
jne 0x4b0540
push 0x4d2d5c
push ebx
call fcn.004b97ec
add esp, 8
push ebx
jmp 0x4b056a
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4b0578
push eax
push 1
push dword [ebp - 8]
push edi
call fcn.004b6de2
add esp, 0x10
push edi
call fcn.004b605a
add esp, 4
push dword [ebp - 0x14]
call fcn.004b605a
mov edi, dword [ebp - 0x3c]
push edi
call fcn.004b98fe
add esp, 8
test eax, eax
je 0x4b0331
mov esi, dword [ebp - 0x18]
jmp 0x4b05cc
push edi
call fcn.004b605a
add esp, 4
push dword [ebp - 0x14]
mov dword [ebp - 0x30], 0xfffffffd
call fcn.004b605a
mov edi, dword [ebp - 0x3c]
add esp, 4
mov esi, dword [ebp - 0x18]
jmp 0x4b05cc
mov dword [ebp - 0x30], 0xfffffffe
push edi
call fcn.004b6a9c
add esp, 4
test ebx, ebx
je 0x4b05e2
push ebx
call fcn.004b6a9c
add esp, 4
test esi, esi
je 0x4b05ef
push esi
call fcn.004b6a9c
add esp, 4
mov eax, dword [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret