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

Disassembly:
push 0xffffffffffffffff
push 0x100f2782
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x10139d00]
xor eax, esp
mov dword [esp + 0x148], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10139d00]
xor eax, esp
push eax
lea eax, [esp + 0x164]
mov dword fs:[0], eax
mov eax, dword [esp + 0x174]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
mov dword [esp + 0x70], eax
xor eax, eax
push SysReAllocString
xor ebp, ebp
push ecx
mov byte [esp + 0xbc], bl
mov dword [esp + 0xbd], eax
mov dword [esp + 0xc1], eax
mov dword [esp + 0xc5], eax
mov dword [esp + 0xc9], eax
mov dword [esp + 0xcd], eax
mov dword [esp + 0xd1], eax
mov dword [esp + 0xd5], eax
mov dword [esp + 0xd9], eax
mov dword [esp + 0xdd], eax
mov byte [esp + 0xe1], al
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], eax
mov dword [esp + 0xec], eax
mov dword [esp + 0xf0], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x74], ebp
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, 0xffffffff
jne 0x10048c5f
lea esi, [ebx + 5]
jmp 0x10049463
lea ecx, [esp + 0x44]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1004941b
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea edx, [esp + 0x1c]
push edx
push 0x38
lea eax, [esp + 0xac]
push eax
push edi
call ebp
test eax, eax
je 0x1004941b
cmp dword [esp + 0x18], 0x38
jne 0x1004941b
cmp ebx, dword [esp + 0x48]
mov eax, dword [esp + 0xc8]
jg 0x1004941b
jl 0x10048cbc
cmp eax, dword [esp + 0x44]
ja 0x1004941b
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push eax
push edi
call esi
cmp eax, 0xffffffff
je 0x1004941b
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 0x10
lea edx, [esp + 0x40]
push edx
push edi
call ebp
test eax, eax
je 0x1004941b
cmp dword [esp + 0x18], 0x10
jne 0x1004941b
mov eax, dword [esp + 0xcc]
add eax, 0x100
push 0x101d5acc
push eax
call fcn.100d457a
add esp, 8
mov dword [esp + 0x1c], eax
cmp eax, ebx
je 0x1004941b
mov ecx, dword [esp + 0xc8]
mov ebp, dword [esp + 0x3c]
sub ebp, dword [esp + 0x34]
push ebx
push ebx
add ecx, 0x10
push ecx
push edi
mov dword [esp + 0x74], ebp
call esi
cmp eax, 0xffffffff
je 0x1004941b
push 0x101d5acc
push ebp
call fcn.100d457a
add esp, 8
mov dword [esp + 0x28], eax
cmp eax, ebx
je 0x1004941b
push ebx
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x1004941b
cmp ebp, dword [esp + 0x18]
jne 0x1004941b
push 0x40
lea eax, [esp + 0x119]
push ebx
push eax
mov dword [esp + 0x20], ebx
mov byte [esp + 0x120], bl
call fcn.100d4cc0
xor eax, eax
mov dword [esp + 0x101], eax
mov dword [esp + 0x105], eax
mov dword [esp + 0x109], eax
mov dword [esp + 0x10d], eax
mov dword [esp + 0x111], eax
mov dword [esp + 0x115], eax
mov dword [esp + 0x119], eax
mov byte [esp + 0x11d], al
mov eax, ebp
shr eax, 5
shl eax, 5
add esp, 0xc
mov byte [esp + 0xf4], bl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x60], eax
cmp eax, ebx
jbe 0x10049028
lea esp, [esp]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
xor esi, esi
lea edi, [esp + 0x152]
lea ebp, [ecx + edx]
movzx eax, byte [esi + ebp]
push eax
push str._02X
lea ecx, [esp + 0xfc]
push 3
push ecx
call fcn.100d46b0
mov dx, word [esp + 0x104]
mov word [edi], dx
inc esi
add esp, 0x10
sub edi, 2
cmp esi, 0x1f
jle 0x10048e14
xor ebp, ebp
mov byte [esp + 0x154], 0
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], ebp
mov byte [esp + 0x88], 0
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x118]
mov dword [esp + 0x170], ebp
call fcn.10048720
test eax, eax
je 0x100490d0
cmp dword [esp + 0x14], ebp
jne 0x10048f39
mov ecx, dword [esp + 0x98]
push 8
add ecx, 0xfffffff8
lea esi, [esp + 0xdc]
lea edx, [esp + 0x88]
call fcn.1002f410
mov byte [esp + 0x16c], 1
cmp dword [esp + 0xf0], 0x10
mov eax, dword [esp + 0xdc]
jae 0x10048ed4
lea eax, [esp + 0xdc]
push 4
lea ecx, [esp + 0x34]
push ecx
push str._08X
push eax
call fcn.100d4611
mov edx, dword [esp + 0xa8]
add edx, 0xfffffff8
add esp, 0x10
push edx
xor ecx, ecx
lea esi, [esp + 0x6c]
lea edx, [esp + 0x88]
call fcn.1002f410
push 0xffffffffffffffff
push ebp
push eax
lea ecx, [esp + 0x90]
mov byte [esp + 0x178], 2
call fcn.10002a30
mov ecx, esi
call fcn.10002cc0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x16c], 0
call fcn.10002cc0
mov edi, dword [esp + 0x98]
add edi, 0xfffffffe
cmp edi, ebp
jl 0x10048fee
mov ebp, dword [esp + 0x1c]
nop
xor eax, eax
push 2
mov ecx, edi
lea esi, [esp + 0x6c]
lea edx, [esp + 0x88]
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x104], eax
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], eax
mov word [esp + 0x114], ax
call fcn.1002f410
cmp dword [eax + 0x18], 0x10
jb 0x10048faa
mov eax, dword [eax + 4]
jmp 0x10048fad
add eax, 4
mov ax, word [eax]
lea ecx, [esp + 0x68]
mov word [esp + 0xf4], ax
call fcn.10002cc0
push 4
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0xfc]
push str._02X
push edx
call fcn.100d4611
mov al, byte [esp + 0x34]
mov byte [ebx + ebp], al
add esp, 0x10
inc ebx
sub edi, 2
jns 0x10048f50
mov esi, dword [esp + 0x14]
add esi, 0x20
lea ecx, [esp + 0x84]
mov dword [esp + 0x14], esi
mov dword [esp + 0x16c], 0xffffffff
call fcn.10002cc0
cmp esi, dword [esp + 0x60]
jb 0x10048e00
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x64]
mov dword [esp + 0x2c], ebx
xor ebx, ebx
cmp dword [esp + 0x14], ebp
jae 0x10049271
push 0x40
lea ecx, [esp + 0x118]
push ebx
push ecx
call fcn.100d4cc0
add esp, 0xc
xor esi, esi
sub ebp, dword [esp + 0x14]
je 0x1004908f
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
lea edi, [esp + ebp*2 + 0x112]
lea ebx, [edx + eax]
nop
movzx ecx, byte [ebx + esi]
push ecx
push str._02X
lea edx, [esp + 0xfc]
push 3
push edx
call fcn.100d46b0
mov ax, word [esp + 0x104]
mov word [edi], ax
inc esi
add esp, 0x10
sub edi, 2
cmp esi, ebp
jb 0x10049060
mov dword [esp + 0x9c], 0xf
mov dword [esp + 0x98], 0
mov byte [esp + 0x88], 0
lea ecx, [esp + 0x84]
push ecx
lea ecx, [esp + 0x118]
mov dword [esp + 0x170], 3
call fcn.10048720
test eax, eax
jne 0x100490ec
lea ecx, [esp + 0x84]
mov esi, 5
call fcn.10002cc0
mov edi, dword [esp + 0x20]
xor ebx, ebx
jmp 0x10049420
cmp dword [esp + 0x14], 0x20
jae 0x100491a2
mov ecx, dword [esp + 0x98]
push 8
add ecx, 0xfffffff8
lea esi, [esp + 0xdc]
lea edx, [esp + 0x88]
call fcn.1002f410
mov byte [esp + 0x16c], 4
mov eax, dword [esp + 0x88]
mov ebx, 0x10
cmp dword [esp + 0x9c], ebx
jae 0x1004913a
lea eax, [esp + 0x88]
push 4
lea edx, [esp + 0x34]
push edx
push str._08X
push eax
call fcn.100d4611
mov eax, dword [esp + 0xa8]
add esp, 0x10
add eax, 0xfffffff8
push eax
xor ecx, ecx
lea esi, [esp + 0x6c]
lea edx, [esp + 0x88]
call fcn.1002f410
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x90]
mov byte [esp + 0x178], 5
call fcn.10002a30
mov ecx, esi
call fcn.10002cc0
lea ecx, [esp + 0xd8]
mov byte [esp + 0x16c], 3
call fcn.10002cc0
jmp 0x100491a7
mov ebx, 0x10
mov edi, dword [esp + 0x98]
add edi, 0xfffffffe
js 0x1004925f
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
lea ebp, [ecx + edx]
xor eax, eax
push 2
mov ecx, edi
lea esi, [esp + 0x6c]
lea edx, [esp + 0x88]
mov dword [esp + 0xf8], eax
mov dword [esp + 0xfc], eax
mov dword [esp + 0x100], eax
mov dword [esp + 0x104], eax
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
mov dword [esp + 0x110], eax
mov word [esp + 0x114], ax
call fcn.1002f410
cmp dword [eax + 0x18], ebx
jb 0x1004921b
mov eax, dword [eax + 4]
jmp 0x1004921e
add eax, 4
mov ax, word [eax]
lea ecx, [esp + 0x68]
mov word [esp + 0xf4], ax
call fcn.10002cc0
push 4
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0xfc]
push str._02X
push edx
call fcn.100d4611
mov al, byte [esp + 0x34]
mov byte [ebp], al
add esp, 0x10
inc ebp
sub edi, 2
jns 0x100491c2
lea ecx, [esp + 0x84]
call fcn.10002cc0
mov edi, dword [esp + 0x20]
xor ebx, ebx
mov esi, dword [esp + 0xd0]
sub esi, dword [esp + 0x3c]
push 0x101d5acc
push esi
call fcn.100d457a
mov ebp, eax
add esp, 8
mov dword [esp + 0x54], ebp
cmp ebp, ebx
je 0x1004941b
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0x3c]
push ebx
push ebx
add edx, ecx
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x1004941b
push ebx
lea eax, [esp + 0x1c]
push eax
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004941b
cmp esi, dword [esp + 0x18]
jne 0x1004941b
mov ecx, dword [esp + 0xd0]
cmp ecx, dword [esp + 0x3c]
jbe 0x100492fd
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
add edx, eax
push edx
push esi
mov edx, ebp
call fcn.10048960
mov ecx, dword [esp + 0x5c]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [esp + 0x58], esi
cmp esi, 0xffffffff
je 0x1004941b
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea edx, [esp + 0x18]
push edx
add eax, 0xfffffffc
push eax
push ecx
push esi
mov dword [esp + 0x28], ebx
call ebp
test eax, eax
je 0x1004940d
mov eax, dword [esp + 0x38]
lea edx, [eax - 4]
cmp edx, dword [esp + 0x14]
jne 0x1004940d
mov edx, dword [esp + 0xd0]
sub edx, dword [esp + 0x3c]
push ebx
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x24]
push edx
add eax, ecx
push eax
push esi
call ebp
test eax, eax
je 0x1004940d
mov edx, dword [esp + 0xd0]
sub edx, dword [esp + 0x3c]
cmp edx, dword [esp + 0x14]
jne 0x1004940d
mov eax, dword [esp + 0xd4]
cmp eax, ebx
je 0x10049414
cmp ebx, dword [esp + 0x48]
jl 0x100493ae
jg 0x1004941b
cmp eax, dword [esp + 0x44]
jae 0x1004941b
push 0x101d5acc
push eax
call fcn.100d457a
mov ebp, eax
add esp, 8
mov dword [esp + 0x50], ebp
cmp ebp, ebx
je 0x1004941b
mov ecx, dword [esp + 0xd4]
push ebx
lea eax, [esp + 0x1c]
push eax
push ecx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004941b
mov eax, dword [esp + 0xd4]
cmp eax, dword [esp + 0x18]
jne 0x1004941b
push ebx
lea edx, [esp + 0x18]
push edx
push eax
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1004940d
mov eax, dword [esp + 0xd4]
cmp eax, dword [esp + 0x14]
je 0x10049414
mov esi, 6
jmp 0x10049420
mov esi, 4
jmp 0x10049420
mov esi, 5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x10049438
push eax
call fcn.100d1ecb
add esp, 4
mov eax, dword [esp + 0x54]
cmp eax, ebx
je 0x10049449
push eax
call fcn.100d1ecb
add esp, 4
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x1004945a
push eax
call fcn.100d1ecb
add esp, 4
mov ebp, dword [esp + 0x58]
cmp ebp, 0xffffffff
je 0x1004946a
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x50]
cmp eax, ebx
je 0x1004947b
push eax
call fcn.100d1ecb
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x164]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.100d0738
add esp, 0x15c
ret 4