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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x539377
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x588088]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xf4], ecx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xf8], ebx
mov eax, dword [ebx]
test eax, eax
je 0x499b5f
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x499b5f
lea ecx, [ebp - 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x499602
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x499b5f
mov eax, dword [ebp - 0x38]
xor esi, esi
add esi, edi
mov ecx, ebx
adc eax, 0
mov dword [ebp - 0x38], eax
call fcn.004a13d0
test al, al
je 0x499b5f
lea ecx, [ebp - 0xc0]
call fcn.00498630
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xc0]
call fcn.004986d0
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0xc0]
call fcn.004991a0
mov edi, dword [ebp - 0x1c]
sub edi, dword [ebp - 0x20]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x4996c4
mov edx, dword [ebp - 0x18]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x4996a5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x499b7f
push edx
push ecx
call fcn.004e1a65
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xc0]
call fcn.0049ac90
cmp dword [ebp - 0x38], 0
ja 0x4996ea
jb 0x499b5f
cmp esi, edi
jb 0x499b5f
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
movq qword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 2
lea eax, [ebp - 0xe9]
push eax
push edi
lea ecx, [ebp - 0x34]
mov byte [ebp - 0xe9], 0
call fcn.0043d270
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push eax
push edi
push dword [ebp - 0x34]
mov ecx, ebx
call fcn.004a11d0
test al, al
je 0x499b0d
cmp dword [ebp - 0x28], edi
jne 0x499b0d
lea ecx, [ebp - 0x70]
call fcn.00498630
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x98]
mov dword [ebp - 0xf0], 0
call fcn.00498630
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x98]
call fcn.004986d0
mov eax, dword [ebp - 0x94]
lea ecx, [ebp - 0x70]
sub eax, dword [ebp - 0x98]
lea edx, [ebp - 0xf0]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.004992b0
add esp, 8
test al, al
je 0x499aee
mov eax, dword [ebp - 0x88]
lea ecx, [ebp - 0x64]
sub eax, dword [ebp - 0x8c]
lea edx, [ebp - 0xf0]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.004992b0
add esp, 8
test al, al
je 0x499aee
mov eax, dword [ebp - 0x7c]
lea ecx, [ebp - 0x58]
sub eax, dword [ebp - 0x80]
lea edx, [ebp - 0xf0]
push ecx
push eax
lea ecx, [ebp - 0x34]
call fcn.004992b0
add esp, 8
test al, al
je 0x499aee
mov edx, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x34]
lea eax, [edx + 4]
cmp eax, ecx
ja 0x499aee
mov ecx, dword [ebp - 0x34]
movzx eax, byte [ecx + edx]
shl eax, 0x18
mov dword [ebp - 0x4c], eax
movzx edx, byte [ecx + edx + 1]
shl edx, 0x10
or edx, eax
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0x4c], edx
movzx ecx, byte [ecx + eax + 2]
mov eax, dword [ebp - 0x34]
shl ecx, 8
or ecx, edx
mov edx, dword [ebp - 0xf0]
mov dword [ebp - 0x4c], ecx
movzx eax, byte [eax + edx + 3]
or eax, ecx
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x98]
call fcn.0049ac90
lea ecx, [ebp - 0xe8]
call fcn.00498630
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xe8]
call fcn.004986d0
lea edx, [ebp - 0xe8]
lea ecx, [ebp - 0x70]
call fcn.0049c4f0
test al, al
je 0x499943
lea ecx, [ebp - 0xc0]
call fcn.00498630
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xc0]
call fcn.004988a0
lea edx, [ebp - 0xc0]
lea ecx, [ebp - 0x70]
call fcn.0049c4f0
test al, al
je 0x499934
lea ecx, [ebp - 0x98]
call fcn.00498630
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x98]
call fcn.00498a70
lea edx, [ebp - 0x98]
lea ecx, [ebp - 0x70]
call fcn.0049c4f0
test al, al
je 0x499925
mov byte [ebp - 4], 6
mov ecx, edx
call fcn.0049ac90
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xc0]
call fcn.0049ac90
xor bl, bl
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xe8]
call fcn.0049ac90
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
call fcn.0049ac90
jmp 0x499b0f
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x98]
call fcn.0049ac90
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xc0]
call fcn.0049ac90
lea edx, [ebp - 0xd0]
lea ecx, [ebp - 0x58]
call fcn.0049c4f0
test al, al
jne 0x499903
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0xc4]
jne 0x499903
mov ecx, dword [ebp - 0xf4]
lea eax, [ebp - 0x70]
push eax
add ecx, 0x24
call fcn.0049adc0
cmp esi, edi
jne 0x499980
cmp dword [ebp - 0x38], 0
jne 0x499980
mov bl, 1
jmp 0x499905
mov eax, dword [ebx]
mov dword [ebp - 0x48], 0
test eax, eax
je 0x499903
cmp dword [eax], 0xffffffff
je 0x499903
push 0
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x28], 0
push ecx
push 4
lea ecx, [ebp - 0x48]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x499903
cmp dword [ebp - 0x28], 4
jne 0x499903
mov ebx, dword [ebp - 0x48]
sub esi, edi
cmp ebx, esi
ja 0x499903
xorps xmm0, xmm0
mov dword [ebp - 0x3c], 0
movq qword [ebp - 0x44], xmm0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov byte [ebp - 4], 8
lea eax, [ebp - 0xe9]
push eax
push ebx
lea ecx, [ebp - 0x44]
mov byte [ebp - 0xe9], 0
call fcn.0043d270
mov ecx, dword [ebp - 0xf8]
lea eax, [ebp - 0x28]
push eax
push ebx
push dword [ebp - 0x44]
call fcn.004a11d0
test al, al
je 0x499a96
cmp dword [ebp - 0x28], ebx
jne 0x499a96
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x54]
je 0x499a96
mov al, byte [eax]
test al, al
jne 0x499a96
mov eax, dword [ebp - 0x40]
mov edx, eax
mov ecx, dword [ebp - 0x44]
sub edx, ecx
test dl, 7
jne 0x499a96
cmp ecx, eax
je 0x499a83
mov eax, dword [ebp - 0x60]
sub eax, dword [ebp - 0x64]
cmp eax, 0x10
jne 0x499a96
lea eax, [ebp - 0x24]
push eax
call fcn.004a82f0
mov esi, dword [ebp - 0x64]
lea eax, [ebp - 0x24]
add esp, 4
xor edx, edx
sub esi, eax
lea ecx, [ebp - 0x24]
add ecx, edx
mov al, byte [ecx + esi]
cmp al, byte [ecx]
jne 0x499a96
inc edx
cmp edx, 0x10
jb 0x499a71
mov ecx, dword [ebp - 0xf4]
lea eax, [ebp - 0x44]
push eax
call fcn.00499cd0
mov bl, al
jmp 0x499a98
xor bl, bl
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x44]
test ecx, ecx
je 0x499905
mov edx, dword [ebp - 0x3c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x499aca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x499b84
push edx
push ecx
call fcn.004e1a65
add esp, 8
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
jmp 0x499905
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x98]
call fcn.0049ac90
xor bl, bl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x70]
call fcn.0049ac90
jmp 0x499b0f
xor bl, bl
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x499b5b
mov edx, dword [ebp - 0x2c]
mov eax, ecx
sub edx, ecx
cmp edx, 0x1000
jb 0x499b3c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x499b89
push edx
push ecx
call fcn.004e1a65
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov al, bl
jmp 0x499b61
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 - 0x14]
xor ecx, ebp
call fcn.004e1a24
mov esp, ebp
pop ebp
ret 4
call fcn.004ecb59
call fcn.004ecb59
call fcn.004ecb59
int3