Function at 0x482100
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c6300
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0x10], esp
push 1
mov esi, ecx
push 0
push ebx
mov dword [ebp - 0x14], esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov dword [ebp - 0x24], eax
push ebx
push 1
lea eax, [ebp - 0x78]
push 0xe
push eax
mov dword [ebp - 4], 0
call edi
add esp, 0x1c
test eax, eax
jne 0x48216b
lea ecx, [ebp - 0x2c]
push 0x4f7438
push ecx
mov dword [ebp - 0x2c], str.Not_a_BMP
call sub.MSVCRT.dll__CxxThrowException
cmp word [ebp - 0x78], 0x4d42
je 0x48218a
mov edx, dword [ebp - 0x24]
push 0
push edx
push ebx
mov dword [ebp - 0x6e], 0
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
lea eax, [esi + 8]
mov ecx, esi
push eax
push ebx
call fcn.00482880
test al, al
jne 0x4821af
lea eax, [ebp - 0x30]
push 0x4f7438
push eax
mov dword [ebp - 0x30], str.Error_reading_BMP_info
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [esi + 0x18]
mov dx, word [esi + 0x16]
mov eax, dword [esi + 0x10]
mov dword [ebp + 8], ecx
mov ecx, dword [esi + 0xc]
push 0
push edx
push eax
push ecx
mov ecx, esi
call fcn.0047e020
test eax, eax
jne 0x4821e4
lea edx, [ebp - 0x34]
push 0x4f7438
push edx
mov dword [ebp - 0x34], str.Cant_allocate_memory
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x14]
call fcn.0047e160
mov esi, eax
test esi, esi
je 0x482295
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 8]
cmp eax, 0xc
mov eax, dword [ecx + 0x28]
jne 0x48226f
test eax, eax
jne 0x482219
mov cx, word [ecx + 0x16]
cmp cx, 8
ja 0x482219
mov eax, 1
shl eax, cl
push ebx
lea eax, [eax + eax*2]
push 1
push eax
push esi
call edi
mov ecx, dword [ebp - 0x14]
add esp, 0x10
mov eax, dword [ecx + 0x28]
test eax, eax
jne 0x482243
mov edx, ecx
mov cx, word [edx + 0x16]
cmp cx, 8
ja 0x482243
mov eax, 1
shl eax, cl
dec eax
test eax, eax
jl 0x482295
lea ecx, [esi + eax*2]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
add ecx, eax
dec eax
mov dl, byte [ecx + 2]
mov byte [esi + eax*4 + 6], dl
mov dl, byte [ecx]
mov byte [esi + eax*4 + 4], dl
mov cl, byte [ecx + 1]
mov byte [esi + eax*4 + 5], cl
mov byte [esi + eax*4 + 7], 0
jmp 0x482244
test eax, eax
jne 0x482284
mov cx, word [ecx + 0x16]
cmp cx, 8
ja 0x482284
mov eax, 1
shl eax, cl
push ebx
lea edx, [eax*4]
push 1
push edx
push esi
call edi
add esp, 0x10
mov eax, dword [ebp - 0x6e]
test eax, eax
je 0x4822ae
mov ecx, dword [ebp - 0x24]
push 0
add eax, ecx
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
xor eax, eax
mov ax, word [ecx + 0x16]
lea esi, [eax - 1]
cmp esi, 0x1f
ja case.0x4822cb.5
xor edx, edx
mov dl, byte [esi + 0x482858]
jmp dword [edx*4 + 0x482844]
cmp dword [ebp + 8], 3
jne 0x482346
mov esi, dword [ebp - 0x14]
mov eax, dword [esi + 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
je 0x482331
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x34]
push ebx
push 1
push ecx
push edx
call edi
mov edi, dword [ebp + 8]
add esp, 0x10
mov ecx, esi
push 0x20
push 0
push 0
push 0
push edi
call fcn.0047dd60
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x38]
push 0x4f7438
push eax
mov dword [ebp - 0x38], str.cant_allocate_memory
call sub.MSVCRT.dll__CxxThrowException
lea ecx, [ebp - 0x3c]
push 0x4f7438
push ecx
mov dword [ebp - 0x3c], str.unknown_compression
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp + 8]
test eax, eax
jne 0x48238a
mov eax, dword [ebp - 0x14]
push ebx
push 1
mov edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x34]
push edx
push eax
call edi
add esp, 0x10
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x40]
push 0x4f7438
push ecx
mov dword [ebp - 0x40], str.unknown_compression
call sub.MSVCRT.dll__CxxThrowException
cmp dword [ecx + 0x18], 3
jne 0x4823b5
push ebx
push 1
lea edx, [ebp - 0x5c]
push 0xc
push edx
call edi
add esp, 0x10
jmp 0x4823ca
mov dword [ebp - 0x5c], 0x7c00
mov dword [ebp - 0x58], 0x3e0
mov dword [ebp - 0x54], 0x1f
mov esi, dword [ebp - 0x14]
push ebx
push 1
mov ecx, dword [esi + 0xc]
lea eax, [ecx + 1]
cdq
sub eax, edx
sar eax, 1
imul eax, ecx
shl eax, 2
push eax
mov eax, dword [esi + 0x34]
push eax
call edi
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x58]
mov eax, dword [ebp - 0x5c]
add esp, 0x10
push 0x10
push ecx
mov ecx, dword [esi + 0x34]
push edx
push eax
push ecx
mov ecx, esi
call fcn.0047dd60
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp + 8]
xor esi, esi
sub eax, esi
je 0x4827e7
dec eax
je 0x482664
dec eax
je 0x482445
lea edx, [ebp - 0x44]
push 0x4f7438
push edx
mov dword [ebp - 0x44], str.compression_type_not_supported
call sub.MSVCRT.dll__CxxThrowException
cmp ecx, esi
mov byte [ebp - 0x18], 0
mov byte [ebp + 0xb], 0
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
je 0x482462
mov ecx, dword [ebp - 0x14]
call fcn.0047e000
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x28], 1
jmp 0x482471
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ebp - 0x28]
test eax, eax
je case.0x4822cb.5
push ebx
push 1
lea eax, [ebp - 0x18]
push 1
push eax
call edi
mov al, byte [ebp - 0x18]
add esp, 0x10
test al, al
je 0x482517
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x4824bb
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx + 0x10]
jg 0x4824bb
mov edi, dword [ecx + 0x30]
call fcn.0047e000
imul edi, dword [ebp - 0x1c]
add edi, eax
mov dword [ebp - 0x58], edi
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
lea edx, [ebp + 0xb]
push 1
push edx
call edi
mov eax, dword [ebp - 0x20]
add esp, 0x10
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
and ecx, 0xff
cmp edx, ecx
jae 0x482471
test eax, eax
je 0x4824f6
mov dl, byte [ebp + 0xb]
mov ecx, dword [ebp - 0x58]
and dl, 0xf
or byte [ecx + esi], dl
inc esi
jmp 0x482502
mov cl, byte [ebp + 0xb]
mov edx, dword [ebp - 0x58]
and cl, 0xf0
mov byte [edx + esi], cl
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
mov ecx, dword [ebp - 0x24]
inc ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], ecx
jmp 0x4824d3
push ebx
push 1
lea edx, [ebp - 0x18]
push 1
push edx
call edi
mov eax, dword [ebp - 0x18]
add esp, 0x10
and eax, 0xff
sub eax, 0
je 0x482653
dec eax
je 0x482647
push ebx
dec eax
push 1
push 1
je 0x482610
lea eax, [ebp + 0xb]
push eax
call edi
mov eax, dword [ebp - 0x1c]
add esp, 0x10
test eax, eax
jl 0x482576
mov edx, dword [ebp - 0x14]
mov ecx, eax
cmp ecx, dword [edx + 0x10]
jg 0x482576
mov ecx, edx
mov edi, dword [ecx + 0x30]
call fcn.0047e000
imul edi, dword [ebp - 0x1c]
add edi, eax
mov dword [ebp - 0x58], edi
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
xor edi, edi
and eax, 0xff
cmp edi, eax
jge 0x4825ea
mov dl, byte [ebp + 0xb]
test ecx, ecx
je 0x4825cf
mov eax, dword [ebp - 0x58]
and dl, 0xf
or byte [eax + esi], dl
mov eax, dword [ebp - 0x18]
mov edx, eax
and edx, 0xff
dec edx
cmp edi, edx
je 0x4825bf
push ebx
push 1
lea eax, [ebp + 0xb]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
add esp, 0x10
inc esi
xor edx, edx
test ecx, ecx
sete dl
mov ecx, edx
inc edi
mov dword [ebp - 0x20], ecx
jmp 0x48257e
mov eax, dword [ebp - 0x58]
and dl, 0xf0
mov byte [eax + esi], dl
mov eax, dword [ebp - 0x18]
xor edx, edx
test ecx, ecx
sete dl
mov ecx, edx
inc edi
mov dword [ebp - 0x20], ecx
jmp 0x48257e
mov al, byte [ebp - 0x18]
and al, 2
cmp al, 2
jne 0x48246b
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
lea ecx, [ebp + 0xb]
push 1
push ecx
call edi
add esp, 0x10
jmp 0x482471
lea edx, [ebp - 0x48]
push edx
call edi
push ebx
push 1
lea eax, [ebp - 0x4c]
push 1
push eax
call edi
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x1c]
and ecx, 0xff
shr ecx, 1
and edx, 0xff
add esp, 0x20
add esi, ecx
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x482471
mov dword [ebp - 0x28], 0
jmp 0x482471
mov eax, dword [ebp - 0x1c]
xor esi, esi
inc eax
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], eax
jmp 0x482471
cmp ecx, esi
mov byte [ebp - 0x1c], 0
mov byte [ebp + 0xb], 0
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], esi
je 0x482681
mov ecx, dword [ebp - 0x14]
call fcn.0047e000
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x28]
test eax, eax
je case.0x4822cb.5
push ebx
push 1
lea eax, [ebp - 0x1c]
push 1
push eax
call edi
mov al, byte [ebp - 0x1c]
add esp, 0x10
test al, al
je 0x4826f8
mov eax, dword [ebp - 0x20]
test eax, eax
jl 0x4826c8
mov ecx, dword [ebp - 0x14]
cmp eax, dword [ecx + 0x10]
jg 0x4826c8
mov esi, dword [ecx + 0x30]
call fcn.0047e000
imul esi, dword [ebp - 0x20]
add esi, eax
mov dword [ebp - 0x58], esi
push ebx
push 1
lea edx, [ebp + 0xb]
push 1
push edx
call edi
add esp, 0x10
xor eax, eax
mov ecx, dword [ebp - 0x1c]
and ecx, 0xff
cmp eax, ecx
jae 0x482688
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x58]
mov dl, byte [ebp + 0xb]
mov byte [ecx + esi], dl
inc esi
mov dword [ebp - 0x18], esi
inc eax
jmp 0x4826d8
push ebx
push 1
lea edx, [ebp - 0x1c]
push 1
push edx
call edi
mov ecx, dword [ebp - 0x1c]
xor edx, edx
mov eax, ecx
add esp, 0x10
and eax, 0xff
sub eax, edx
je 0x4827d8
dec eax
je 0x4827d0
dec eax
je 0x482790
mov eax, dword [ebp - 0x20]
cmp eax, edx
jl 0x482749
mov edx, dword [ebp - 0x14]
cmp eax, dword [edx + 0x10]
jg 0x482749
mov ecx, edx
mov esi, dword [ecx + 0x30]
call fcn.0047e000
imul esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
add esi, eax
mov dword [ebp - 0x58], esi
mov eax, dword [ebp - 0x58]
push ebx
and ecx, 0xff
push 1
push ecx
mov ecx, dword [ebp - 0x18]
add eax, ecx
push eax
call edi
mov dl, byte [ebp - 0x1c]
add esp, 0x10
and dl, 1
cmp dl, 1
jne 0x48277a
push ebx
push 1
lea eax, [ebp + 0xb]
push 1
push eax
call edi
add esp, 0x10
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
and ecx, 0xff
add eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x482688
push ebx
push 1
lea edx, [ebp - 0x4c]
push 1
push edx
call edi
push ebx
push 1
lea eax, [ebp - 0x48]
push 1
push eax
call edi
mov ecx, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
and ecx, 0xff
add edx, ecx
add esp, 0x20
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x48]
and edx, 0xff
add eax, edx
mov dword [ebp - 0x20], eax
jmp 0x482688
mov dword [ebp - 0x28], edx
jmp 0x482688
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
inc eax
mov dword [ebp - 0x20], eax
jmp 0x482688
mov eax, dword [ebp - 0x14]
push ebx
push 1
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x34]
push ecx
push edx
call edi
add esp, 0x10
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
daa
div esp
dec dword [ebp + 0x65e9c04d]
lea ecx, [ebp - 0x40]
invalid
sti
lea ecx, [ebp - 0x40]
jmp fcn.004027b5
sti
dec dword [ebp - 0x73163fb3]
jge 0x4c2c4c
invalid
dec dword [ebp - 0x7b1647b3]
jge 0x4c2c54
test byte [ebp - 0xb], bh
dec dword [ebp + 0x7ce9b04d]
jge 0x4c2c5c
invalid