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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x44]
xor ebx, ebx
push edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], ebx
mov dword [0x1b00fa58], ebx
call fcn.1b009000
add esp, 4
test eax, eax
je 0x1b0098a3
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x500000
mov dword [esp + 0x1c], eax
jb 0x1b009275
cmp eax, 0xc00000
ja 0x1b009275
push ebx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x1c]
push eax
call fcn.1b00a1bb
mov edx, dword [esp + 0x20]
add esp, 4
lea ecx, [esp + 0x1c]
mov esi, eax
push ebx
push ecx
push edx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x1c]
push eax
push esi
call fcn.1b009180
add esp, 8
test eax, eax
je 0x1b009260
mov dword [esp + 0x30], 1
push esi
call fcn.1b00a1b0
mov eax, dword [esp + 0x34]
add esp, 4
cmp eax, ebx
jne 0x1b0098a3
mov eax, dword [str._f_n_]
cmp eax, 0x527d6994
mov eax, dword [0x1b00f988]
jne 0x1b009291
cmp eax, 0x22d2
je 0x1b0098a3
mov edx, dword [0x1b00f9e0]
xor ebp, ebp
mov bp, word [0x1b00f966]
mov dword [0x1b00fa5c], eax
xor eax, eax
cmp ebp, ebx
mov dword [esp + 0x3c], ebp
mov dword [0x1b00fa60], edx
jle 0x1b0092e4
mov esi, dword [0x1b00fa58]
lea ecx, [esi + 0xc]
mov ebx, dword [ecx + 4]
add ebx, dword [ecx]
cmp ebx, edx
ja 0x1b0092d1
inc eax
add ecx, 0x28
cmp eax, ebp
jl 0x1b0092be
jmp 0x1b0092e4
lea ecx, [eax + eax*4]
lea eax, [esi + ecx*8 + 0x24]
mov ecx, dword [esi + ecx*8 + 0x24]
or ecx, 0x80000000
mov dword [eax], ecx
mov edx, dword [0x1b00fa58]
lea eax, [ebp + ebp*4]
shl eax, 3
mov dword [esp + 0x34], eax
mov ebx, dword [eax + edx - 0x1c]
mov eax, dword [0x1b00fa00]
cmp eax, ebx
jne 0x1b009374
mov eax, dword [0x1b00fa04]
mov dword [0x1b00fa70], ebx
push eax
push 0x40
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x1b0098a3
mov eax, dword [0x1b00fa58]
dec ebp
push 0
push 0
lea esi, [ebp + ebp*4]
mov dword [esp + 0x44], ebp
shl esi, 3
mov dword [esp + 0x3c], esi
mov ecx, dword [esi + eax + 0x14]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x18]
push 0
push edx
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [0x1b00fa58]
push 0
push 0
mov eax, dword [esi + edx + 0x14]
push eax
jmp 0x1b009394
test eax, eax
mov dword [esp + 0x20], 0
jne 0x1b0098a3
mov ebx, dword [0x1b00f9b0]
push 2
push eax
mov dword [0x1b00fa70], ebx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [0x1b00fa80]
mov edx, dword [0x1b00fa58]
mov esi, dword [0x1b00fa7c]
mov dword [0x1b00fa64], ebp
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x34]
shl ecx, 3
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x1b00fa98]
cmp eax, 0x1000
ja 0x1b0093de
mov eax, 0x1000
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x14], eax
je 0x1b009885
mov edx, dword [0x1b00fa94]
mov esi, dword [0x1b00fa7c]
mov ecx, dword [0x1b00fa98]
mov edi, dword [0x1b00fa74]
lea edx, [edx + edx*4]
mov dword [esp + 0x24], eax
mov esi, dword [esi + edx*8 + 0xc]
mov edx, ecx
add esi, edi
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add eax, 8
and ecx, 3
mov dword [esp + 0x38], eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x1b00fa80]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x28], eax
jle 0x1b0098ce
mov esi, dword [esp + 0x34]
xor ebp, ebp
mov dword [esp + 0x34], esi
mov edi, dword [esp + 0x44]
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [0x1b00fa58]
mov dword [esi + ecx + 0x14], eax
mov edx, dword [0x1b00fa58]
mov dword [esi + edx + 0xc], ebx
mov eax, dword [0x1b00fa7c]
mov ecx, dword [eax + ebp + 0x10]
mov eax, dword [0x1b00f99c]
lea edx, [ecx + eax - 1]
mov ecx, dword [esp + 0x28]
neg eax
and edx, eax
mov eax, dword [0x1b00fa58]
mov dword [esi + eax + 0x10], edx
mov eax, dword [0x1b00fa94]
cmp ecx, eax
jne 0x1b009551
mov edx, dword [0x1b00fa98]
mov ecx, dword [esp + 0x20]
mov dword [0x1b00fa00], ebx
push 0
lea eax, [edx + ecx]
mov edx, dword [0x1b00fa58]
mov dword [0x1b00fa04], eax
mov dword [esi + edx + 8], eax
mov eax, dword [0x1b00f99c]
mov edx, dword [0x1b00fa98]
add edx, eax
neg eax
lea edx, [edx + ecx - 1]
and edx, eax
mov eax, dword [0x1b00fa58]
mov dword [esi + eax + 0x10], edx
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [0x1b00fa98]
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push 0
push ecx
push edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x14]
mov ecx, 0x400
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [0x1b00fa58]
push eax
lea ecx, [esp + 0x1c]
mov eax, dword [esi + edx + 0x10]
mov edx, dword [0x1b00fa98]
push ecx
mov ecx, dword [esp + 0x28]
sub eax, edx
mov edx, dword [esp + 0x4c]
sub eax, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x1b009732
mov eax, dword [0x1b00fa7c]
mov ecx, dword [eax + ebp + 0x10]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x10], eax
je 0x1b009881
mov eax, dword [0x1b00fa7c]
mov edx, dword [0x1b00fa74]
mov edi, dword [esp + 0x10]
mov esi, dword [eax + ebp + 0xc]
mov ecx, dword [eax + ebp + 0x10]
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x24]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x1b00fa7c]
mov edx, dword [eax]
mov eax, dword [ecx + ebp + 0x10]
mov edi, dword [ecx + ebp + 0xc]
add eax, edi
cmp eax, edx
jbe 0x1b009687
mov eax, dword [0x1b00fa9c]
mov esi, dword [esp + 0x14]
add eax, esi
mov esi, dword [esp + 0x38]
cmp esi, eax
jae 0x1b009687
mov eax, dword [ecx + ebp + 0xc]
sub edx, eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 4]
sub eax, 8
shr eax, 1
mov edi, eax
dec eax
test edi, edi
je 0x1b00964e
inc eax
mov dword [esp + 0x38], eax
mov ax, word [esi]
mov edi, eax
and edi, 0xf000
cmp edi, 0x3000
jne 0x1b009640
mov edi, dword [esp + 0x10]
mov ecx, dword [ecx + ebp + 0xc]
and eax, 0xfff
add eax, edx
add eax, edi
mov edi, dword [0x1b00fa78]
add ecx, dword [edi + 0x34]
mov edi, dword [eax]
sub edi, ecx
mov ecx, dword [esp + 0x10]
mov dword [eax], edi
mov ax, word [esi]
and eax, 0xfff
add eax, edx
add eax, ecx
mov ecx, dword [0x1b00f994]
add ecx, ebx
mov edi, dword [eax]
add edi, ecx
mov dword [eax], edi
mov ecx, dword [0x1b00fa7c]
mov eax, dword [esp + 0x38]
add esi, 2
dec eax
mov dword [esp + 0x38], eax
jne 0x1b0095e9
mov eax, dword [ecx + ebp + 0xc]
mov edx, ebx
sub edx, eax
mov eax, dword [esp + 0x24]
mov edi, dword [eax]
add edi, edx
mov dword [eax], edi
mov ecx, dword [0x1b00fa7c]
mov eax, esi
add esi, 8
mov edi, dword [ecx + ebp + 0xc]
mov dword [esp + 0x24], eax
mov edx, dword [eax]
mov eax, dword [ecx + ebp + 0x10]
add eax, edi
mov dword [esp + 0x38], esi
cmp eax, edx
ja 0x1b0095b4
mov edx, dword [esp + 0x28]
mov eax, dword [0x1b00fa8c]
cmp edx, eax
jne 0x1b0096f8
mov eax, dword [0x1b00fa78]
mov ecx, dword [ecx + ebp + 0xc]
mov esi, dword [esp + 0x10]
mov edx, ebx
mov eax, dword [eax + 0x80]
sub edx, ecx
sub eax, ecx
mov ecx, dword [eax + esi]
add eax, esi
xor edi, edi
cmp ecx, edi
je 0x1b0096fa
mov esi, dword [eax + 0xc]
mov ecx, dword [eax]
add esi, edx
add ecx, edx
mov dword [eax + 0xc], esi
mov esi, dword [eax + 0x10]
add esi, edx
mov dword [eax], ecx
mov dword [eax + 0x10], esi
mov esi, dword [esp + 0x10]
sub ecx, ebx
mov dword [eax + 8], edi
add ecx, esi
mov dword [eax + 4], edi
mov esi, dword [ecx]
add esi, edx
mov dword [ecx], esi
mov esi, dword [ecx + 4]
add ecx, 4
cmp esi, edi
jne 0x1b0096de
mov ecx, dword [eax + 0x14]
add eax, 0x14
cmp ecx, edi
jne 0x1b0096b8
jmp 0x1b0096fa
xor edi, edi
mov edx, dword [0x1b00fa58]
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push edi
push ecx
mov ecx, dword [eax + edx + 0x10]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x4c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x10], edi
mov edx, dword [0x1b00fa58]
mov eax, dword [0x1b00f998]
add ebp, 0x28
mov ecx, dword [esi + edx + 8]
add esi, 0x28
mov dword [esp + 0x34], esi
lea ecx, [ecx + eax - 1]
neg eax
and ecx, eax
mov eax, dword [esp + 0x28]
add ebx, ecx
mov ecx, dword [0x1b00fa80]
inc eax
cmp eax, ecx
mov dword [esp + 0x28], eax
jl 0x1b00944d
mov ebp, dword [esp + 0x3c]
xor eax, eax
mov dword [0x1b00fa30], eax
mov dword [0x1b00fa34], eax
mov dword [0x1b00fa38], eax
mov dword [0x1b00fa3c], eax
mov eax, dword [0x1b00fa84]
mov edi, dword [0x1b00fa90]
add eax, ebp
add ebp, ecx
lea eax, [eax + eax*4]
mov esi, dword [edx + eax*8 + 0xc]
lea eax, [edx + eax*8 + 0xc]
add esi, edi
xor edi, edi
mov dword [0x1b00f9e0], esi
mov esi, dword [0x1b00fa78]
mov esi, dword [esi + 0x84]
mov dword [0x1b00f9b0], ebx
mov dword [0x1b00f9e4], esi
mov eax, dword [eax]
mov esi, dword [0x1b00fa88]
xor ebx, ebx
add eax, esi
xor esi, esi
mov dword [0x1b00f988], eax
xor eax, eax
mov ax, bp
mov word [0x1b00f966], bp
test eax, eax
mov dword [0x1b00f97c], ebx
mov dword [0x1b00f980], edi
mov dword [0x1b00f984], esi
jle 0x1b00982b
lea ecx, [edx + 0x10]
mov dl, 0x80
test byte [ecx + 0x14], 0x20
je 0x1b00980a
add ebx, dword [ecx]
mov dword [0x1b00f97c], ebx
test byte [ecx + 0x14], 0x40
je 0x1b009818
add edi, dword [ecx]
mov dword [0x1b00f980], edi
test byte [ecx + 0x14], dl
je 0x1b009825
add esi, dword [ecx]
mov dword [0x1b00f984], esi
add ecx, 0x28
dec eax
jne 0x1b0097fc
mov ecx, dword [0x1b00fa6c]
mov esi, dword [esp + 0x44]
push 0
add ecx, 0xffffff08
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x18]
push 0
push edx
push 0xf8
push 0x1b00f960
push esi
call edi
lea eax, [esp + 0x18]
push 0
push eax
xor eax, eax
mov ax, word [0x1b00f966]
mov edx, dword [0x1b00fa58]
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
push edx
push esi
call edi
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x1b009898
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1b0098a3
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x1b00fa58]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x1b0098b7
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp]
test eax, eax
je 0x1b0098c6
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x20]
add esp, 0x30
ret
mov edx, dword [0x1b00fa58]
jmp 0x1b009772