Function at 0x49bd40
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a1850
mov eax, dword fs:[0]
push eax
sub esp, 0xa0
mov eax, dword [0x4e24e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x90], eax
cmp ecx, ebx
je 0x49be72
cmp eax, ebx
je 0x49be72
lea edi, [ebp - 0x48]
call fcn.0048cd90
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x44]
mov esi, 8
cmp dword [ebp - 0x30], esi
jae 0x49bda4
lea eax, [ebp - 0x44]
push eax
call dword [0x4a93e0]
test eax, eax
je 0x49be6a
mov eax, dword [ebp - 0x44]
cmp dword [ebp - 0x30], esi
jae 0x49bdbe
lea eax, [ebp - 0x44]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x49be6a
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], 0
push ebx
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x8c], ebx
test ebx, ebx
je 0x49be55
push 0x4e777e
push ebx
call fcn.00446936
mov esi, eax
add esp, 8
test esi, esi
je 0x49be55
push 0
lea eax, [ebp - 0x88]
push eax
push ebx
push esi
push edi
mov dword [ebp - 0x88], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
jne 0x49be4c
cmp dword [ebp - 0x88], ebx
jne 0x49be4c
push ebx
push esi
lea ecx, [ebp - 0x2c]
call fcn.004100e0
push esi
call fcn.00446717
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0
lea ecx, [ebp - 0x2c]
jne 0x49be90
call fcn.004107d0
lea ecx, [ebp - 0x48]
call fcn.00402f70
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044557a
mov esp, ebp
pop ebp
ret
push 0
push ecx
mov edx, 0x4af2d8
mov byte [ebp - 0x81], 0
call fcn.00412fc0
cmp eax, 0xffffffff
je 0x49c017
mov ecx, 0x4af2d8
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x49beb5
sub ecx, esi
lea edi, [ecx + eax]
push edi
lea edx, [ebp - 0x2c]
push edx
mov edx, 0x4af2ec
call fcn.00412fc0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x49c017
sub eax, edi
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00410310
mov eax, dword [0x4ea5dc]
cmp eax, 2
je 0x49befa
cmp eax, 3
je 0x49bf01
test eax, eax
jne 0x49bf01
mov eax, 0x4af2f0
jmp 0x49bf06
mov eax, 0x4af2f4
push eax
lea ecx, [ebp - 0x64]
call fcn.004101f0
mov dword [ebp - 0x68], 0xf
mov dword [ebp - 0x6c], 0
mov byte [ebp - 0x7c], 0
mov edx, dword [ebp - 0x90]
lea eax, [ebp - 0xac]
mov byte [ebp - 4], 3
call fcn.00402f00
lea ecx, [ebp - 0x80]
push ecx
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 4
call fcn.004909e0
add esp, 4
lea edx, [ebp - 0x64]
push edx
mov edx, str.__ext_
mov esi, eax
call fcn.00405600
push 0xffffffffffffffff
push 0
push esi
mov esi, eax
call fcn.004092a0
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 3
call fcn.00402f70
lea eax, [ebp - 0x64]
push eax
lea esi, [ebp - 0x2c]
call fcn.00431690
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x44]
sub ecx, ebx
add ecx, edi
mov edi, dword [ebp - 0x8c]
add edi, ecx
cmp dword [ebp - 0x30], 8
jae 0x49bf9e
lea eax, [ebp - 0x44]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x49c007
cmp dword [ebp - 0x14], 0x10
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x88], 0
jae 0x49bfd4
lea eax, [ebp - 0x28]
push 0
lea edx, [ebp - 0x88]
push edx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x49bff9
mov byte [ebp - 0x81], al
cmp dword [ebp - 0x88], edi
je 0x49c000
mov byte [ebp - 0x81], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x80]
call fcn.004107d0
lea ecx, [ebp - 0x64]
call fcn.004107d0
lea ecx, [ebp - 0x2c]
call fcn.004107d0
lea ecx, [ebp - 0x48]
call fcn.00402f70
mov al, byte [ebp - 0x81]
jmp 0x49be74