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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x30]
push ebp
push esi
push edi
xor edi, edi
cmp ebx, edi
jne 0x100bb10b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push ebx
call fcn.100c27f0
add esp, 4
test eax, eax
jne 0x100bb120
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov eax, dword [ebx]
mov dword [esp + 0x10], edi
cmp eax, 1
jne 0x100bb2b4
mov ebx, dword [ebx + 4]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push eax
push edi
push edi
push ebx
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x100bb14f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [esp + 0x14], 0
sub edi, esi
test edi, edi
mov dword [esp + 0x28], edi
jle 0x100bb1ab
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], eax
push 0
push ecx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100bb1a3
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
push 0
push 0
push esi
push ebx
call ebp
mov ecx, dword [esp + 0x38]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
jle 0x100bb251
lea edi, [esp + 0x48]
mov eax, dword [edi + 8]
xor ebp, ebp
cmp eax, reloc.WS2_32.dll_connect
jne 0x100bb1d8
mov esi, dword [edi]
jmp 0x100bb1ec
push edi
call fcn.100c2820
mov esi, eax
add esp, 4
test esi, esi
je 0x100bb226
mov ebp, 1
push esi
call fcn.100c13a0
add esp, 4
test eax, eax
jle 0x100bb211
lea ecx, [esp + 0x1c]
push 0
push ecx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100bb211
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x100bb21e
push esi
call sub.MSVCRT.dll_free
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100bb293
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
inc eax
add edi, 0xc
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x100bb1c8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100bb293
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [esp + 0x28]
mov eax, 1
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x100bb610
push eax
push 0
push 0
push ebx
call ebp
lea edx, [esp + 0x1c]
push 0
push edx
push edi
mov edi, dword [esp + 0x20]
mov esi, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100bb289
push 0
push 0
push esi
push ebx
call ebp
jmp 0x100bb297
mov dword [esp + 0x10], 0
jmp 0x100bb297
mov edi, dword [esp + 0x14]
test edi, edi
je 0x100bb610
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x14]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp eax, 2
jne 0x100bb3be
mov ebx, dword [ebx + 4]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x14]
mov edx, dword [ebx]
lea eax, [esp + 0x30]
lea ecx, [esp + 0x28]
push eax
push ecx
push 0xffffffffffffffff
push edi
mov ecx, ebx
call dword [edx + 0x30]
mov ebp, eax
mov dword [esp + 0x18], edi
test ebp, ebp
mov dword [esp + 0x24], ebp
jle 0x100bb30e
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, dword [esp + 0x2c]
mov ecx, ebp
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], eax
rep movsb byte es:[edi], byte [esi]
mov edi, eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], 1
cmp eax, 1
jle 0x100bb385
dec eax
lea edi, [esp + 0x48]
mov dword [esp + 0x38], eax
mov eax, dword [edi + 8]
xor ebp, ebp
cmp eax, reloc.WS2_32.dll_connect
jne 0x100bb338
mov esi, dword [edi]
jmp 0x100bb34c
push edi
call fcn.100c2820
mov esi, eax
add esp, 4
test esi, esi
je 0x100bb36f
mov ebp, 1
push esi
call fcn.100c13a0
add esp, 4
test eax, eax
jle 0x100bb362
mov edx, dword [ebx]
push eax
push esi
mov ecx, ebx
call dword [edx + 0x24]
test ebp, ebp
je 0x100bb36f
push esi
call sub.MSVCRT.dll_free
add esp, 4
mov eax, dword [esp + 0x38]
add edi, 0xc
dec eax
mov dword [esp + 0x38], eax
jne 0x100bb328
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x100bb610
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov edx, dword [ebx]
push ebp
push edi
mov ecx, ebx
mov esi, eax
call dword [edx + 0x24]
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebx]
add esp, 4
mov ecx, ebx
push 0
push esi
call dword [eax + 0x18]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp eax, 3
jne 0x100bb610
mov edi, dword [ebx + 4]
push 1
push 0
push 0
push edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100bb3ec
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
mov dword [esp + 0x14], 0
sub ebp, esi
test ebp, ebp
mov dword [esp + 0x1c], ebp
jle 0x100bb477
push ebp
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea ecx, [esp + 0x20]
mov dword [esp + 0x14], eax
push 0
push ecx
push ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x100bb441
mov edx, dword [esp + 0x14]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
mov edx, dword [ebx + 0x130]
mov eax, dword [esp + 0x20]
lea ecx, [ebx + 0xc]
mov dword [esp + 0x1c], eax
push ecx
lea ecx, [ebx + 0x2c]
push edx
mov edx, dword [esp + 0x1c]
push ecx
push eax
push edx
push esi
call fcn.100c1bc0
add esp, 0x18
push 0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], eax
jle 0x100bb59f
lea ebp, [esp + 0x48]
mov dword [esp + 0x28], ebp
push 1
push 0
push 0
push edi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
cmp eax, reloc.WS2_32.dll_connect
jne 0x100bb4c0
mov esi, dword [ebp]
jmp 0x100bb4db
push ebp
call fcn.100c2820
mov esi, eax
add esp, 4
test esi, esi
je 0x100bb572
mov dword [esp + 0x18], 1
push esi
call fcn.100c13a0
mov ebp, eax
add esp, 4
test ebp, ebp
jle 0x100bb551
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x100bb51b
push ebp
call sub.MSVCRT.dll_malloc
mov ecx, ebp
mov edi, eax
mov edx, ecx
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [esp + 0x18], 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x2c]
mov esi, eax
mov ecx, dword [ebx + 0x130]
lea eax, [ebx + 0xc]
push eax
mov eax, dword [esp + 0x34]
lea edx, [ebx + 0x2c]
push ecx
push edx
push ebp
push esi
push eax
call fcn.100c1bc0
add esp, 0x18
lea ecx, [esp + 0x20]
push 0
push ecx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100bb551
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100bb562
push esi
call sub.MSVCRT.dll_free
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100bb5ff
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
inc eax
add ebp, 0xc
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ebp
jl 0x100bb498
mov eax, dword [esp + 0x10]
test eax, eax
je 0x100bb5ff
mov ebp, dword [esp + 0x1c]
mov eax, 1
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x100bb610
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
mov eax, dword [ebx + 0x130]
lea edx, [ebx + 0xc]
add ebx, 0x2c
push edx
push eax
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push ebx
push esi
call fcn.100c1bc0
add esp, 0x18
lea ecx, [esp + 0x20]
push 0
push ecx
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100bb5f5
push 0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x100bb603
mov dword [esp + 0x10], 0
jmp 0x100bb603
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x100bb610
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret