Function at 0x517800
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4cc
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x4bc], eax
lea eax, [ebp - 0x4c4]
push eax
push ebx
mov dword [ebp - 0x4b8], ebx
call fcn.0045d270
add esp, 8
test eax, eax
jne 0x51784e
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x4c8]
push eax
push ebx
call fcn.0045d270
add esp, 8
test eax, eax
je 0x51783a
lea eax, [ebp - 0x4a4]
push eax
push ebx
call fcn.0045d270
add esp, 8
test eax, eax
je 0x51783a
lea eax, [ebp - 0x4ac]
push eax
push ebx
call fcn.0045d270
add esp, 8
test eax, eax
je 0x51783a
mov eax, dword [ebp - 0x4c4]
dec eax
push esi
cmp eax, 0x7cff
ja 0x517dda
mov eax, dword [ebp - 0x4c8]
dec eax
cmp eax, 0x7cff
ja 0x517dda
mov esi, dword [ebp - 0x4ac]
cmp esi, 4
jg 0x517dda
push 4
push 0x10000
call fcn.00592c0b
add esp, 8
mov dword [ebp - 0x4b0], eax
test eax, eax
jne 0x5178ec
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [ebp - 0x4a4]
push 9
push edi
call fcn.00592c0b
add esp, 8
mov dword [ebp - 0x4b4], eax
test eax, eax
jne 0x51792c
push dword [ebp - 0x4b0]
call fcn.00592c4b
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push eax
push dword [ebp - 0x4b0]
push esi
push edi
push ebx
call fcn.00516c10
add esp, 0x14
test ax, ax
je 0x517959
pop edi
pop esi
mov eax, 4
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x4a0]
push eax
call fcn.00457d90
movq xmm0, qword [str.X_PixMap2]
add esp, 4
mov ax, word [0x5f0b0c]
mov edx, dword [ebp - 0x4a4]
movq qword [ebp - 0x3ba], xmm0
mov word [ebp - 0x3b2], ax
mov dword [ebp - 0x4a0], 2
cmp edx, 0x100
jle 0x5179ba
mov ecx, dword [ebp - 0x4c4]
mov eax, 0x18
mov word [ebp - 0x486], ax
lea eax, [ecx + ecx*2]
mov dword [ebp - 0x480], eax
jmp 0x5179dc
push edx
call fcn.004553b0
mov ecx, dword [ebp - 0x4c4]
add esp, 4
mov edx, dword [ebp - 0x4a4]
mov word [ebp - 0x486], ax
mov dword [ebp - 0x480], ecx
mov ebx, dword [ebp - 0x4b4]
mov eax, 1
mov word [ebp - 0x488], ax
mov eax, dword [ebp - 0x4c8]
mov dword [ebp - 0x48c], eax
xor eax, eax
mov dword [ebp - 0x490], ecx
test edx, edx
jle 0x517a26
lea ecx, [ebx + 8]
lea esp, [esp]
cmp byte [ecx], 0
jne 0x517a1f
inc eax
add ecx, 9
cmp eax, edx
jl 0x517a10
jmp 0x517a26
mov word [ebp - 0x45c], ax
lea eax, [ebp - 0x4a0]
push eax
push dword [ebp - 0x4bc]
call fcn.00456000
movzx edi, ax
add esp, 8
test di, di
jne 0x517db2
push 0x5169f0
push 9
push dword [ebp - 0x4a4]
push ebx
call fcn.005969e0
add esp, 0x10
mov dword [ebp - 0x4cc], 0
cmp dword [ebp - 0x48c], 0
jle 0x517d51
mov edi, dword [ebp - 0x4b8]
jmp 0x517a82
mov edi, ebx
push dword [edi]
call fcn.00595867
add esp, 4
test eax, eax
jne 0x517a9f
push dword [edi]
call fcn.00597fff
add esp, 4
cmp eax, 0xa
jne 0x517a82
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x4c0], esi
cmp dword [ebp - 0x490], ebx
jle 0x517d06
mov eax, dword [ebp - 0x4ac]
mov ecx, ebx
mov dword [ebp - 0x4a8], ebx
jmp 0x517ad0
cmp dword [ebp - 0x4a4], 0x100
jg 0x517bf0
cmp eax, 2
jle 0x517b8c
push dword [edi]
push 1
push eax
lea eax, [ebp - 0x32c]
push eax
call fcn.00595b79
xor ebx, ebx
add esp, 0x10
cmp dword [ebp - 0x4a4], ebx
jle 0x517b7e
mov edi, dword [ebp - 0x4b4]
lea ecx, [ecx]
mov esi, dword [ebp - 0x4ac]
lea edx, [ebp - 0x32c]
mov eax, edi
sub esi, 4
jb 0x517b34
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x517b39
add edx, 4
add eax, 4
sub esi, 4
jae 0x517b23
cmp esi, 0xfffffffc
je 0x517b72
mov cl, byte [edx]
cmp cl, byte [eax]
jne 0x517b66
cmp esi, 0xfffffffd
je 0x517b72
mov cl, byte [edx + 1]
cmp cl, byte [eax + 1]
jne 0x517b66
cmp esi, 0xfffffffe
je 0x517b72
mov cl, byte [edx + 2]
cmp cl, byte [eax + 2]
jne 0x517b66
cmp esi, 0xffffffff
je 0x517b72
mov cl, byte [edx + 3]
cmp cl, byte [eax + 3]
je 0x517b72
inc ebx
add edi, 9
cmp ebx, dword [ebp - 0x4a4]
jl 0x517b10
mov edi, dword [ebp - 0x4b8]
mov esi, dword [ebp - 0x4c0]
mov eax, dword [ebp - 0x494]
mov byte [eax + esi], bl
jmp 0x517cde
cmp eax, 1
jne 0x517bb2
push dword [edi]
call fcn.00597fff
mov ecx, dword [ebp - 0x4b0]
add esp, 4
mov cl, byte [ecx + eax*4]
mov eax, dword [ebp - 0x494]
mov byte [eax + esi], cl
jmp 0x517cde
cmp eax, 2
jne 0x517cea
push dword [edi]
call fcn.00597fff
push dword [edi]
mov esi, eax
call fcn.00597fff
shl esi, 8
add esp, 8
add esi, eax
mov eax, dword [ebp - 0x4b0]
mov cl, byte [eax + esi*4]
mov eax, dword [ebp - 0x494]
mov esi, dword [ebp - 0x4c0]
mov byte [eax + esi], cl
jmp 0x517cde
cmp eax, 2
jle 0x517c55
push dword [edi]
push 1
push eax
lea eax, [ebp - 0x338]
push eax
call fcn.00595b79
mov eax, dword [ebp - 0x4ac]
mov ebx, dword [ebp - 0x4b4]
push 0x5169f0
push 9
push dword [ebp - 0x4a4]
mov byte [ebp + eax - 0x338], 0
lea eax, [ebp - 0x338]
push ebx
push eax
call fcn.005978c2
mov ecx, eax
add esp, 0x24
test ecx, ecx
je 0x517c51
sub ecx, ebx
mov eax, 0x38e38e39
imul ecx
sar edx, 1
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x517c9b
xor ebx, ebx
jmp 0x517c9b
cmp eax, 1
jne 0x517c6f
push dword [edi]
call fcn.00597fff
mov ecx, dword [ebp - 0x4b0]
add esp, 4
mov ebx, dword [ecx + eax*4]
jmp 0x517c9b
cmp eax, 2
jne 0x517c9b
push dword [edi]
call fcn.00597fff
push dword [edi]
mov esi, eax
call fcn.00597fff
shl esi, 8
add esp, 8
add esi, eax
mov eax, dword [ebp - 0x4b0]
mov ebx, dword [eax + esi*4]
mov esi, dword [ebp - 0x4c0]
mov eax, dword [ebp - 0x4b4]
mov edi, dword [ebp - 0x4a8]
lea edx, [eax + ebx*8]
mov eax, dword [ebp - 0x494]
movzx ecx, byte [edx + ebx + 5]
mov byte [edi + eax], cl
mov eax, dword [ebp - 0x494]
movzx ecx, byte [edx + ebx + 6]
mov byte [edi + eax + 1], cl
movzx ecx, byte [edx + ebx + 7]
mov edx, edi
mov eax, dword [ebp - 0x494]
mov edi, dword [ebp - 0x4b8]
mov byte [edx + eax + 2], cl
mov ecx, dword [ebp - 0x4a8]
mov eax, dword [ebp - 0x4ac]
inc esi
add ecx, 3
mov dword [ebp - 0x4c0], esi
mov dword [ebp - 0x4a8], ecx
cmp esi, dword [ebp - 0x490]
jl 0x517ad0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp - 0x4bc]
call fcn.004585b0
movzx edi, ax
add esp, 0x10
test di, di
jne 0x517d4b
mov ebx, dword [ebp - 0x4b8]
push dword [ebx]
call fcn.00597fff
mov esi, dword [ebp - 0x4cc]
add esp, 4
inc esi
mov dword [ebp - 0x4cc], esi
cmp esi, dword [ebp - 0x48c]
jl 0x517a80
mov ebx, dword [ebp - 0x4b4]
mov esi, dword [ebp - 0x4a4]
cmp esi, 0x100
jg 0x517d9e
test esi, esi
jle 0x517d8e
lea ecx, [ebp - 0x303]
lea edx, [ebx + 6]
lea esp, [esp]
movzx eax, byte [edx - 1]
lea edx, [edx + 9]
mov byte [ecx - 1], al
lea ecx, [ecx + 3]
movzx eax, byte [edx - 9]
mov byte [ecx - 3], al
movzx eax, byte [edx - 8]
mov byte [ecx - 2], al
dec esi
jne 0x517d70
lea eax, [ebp - 0x304]
push eax
push 8
push 0x100
jmp 0x517da4
push 0
push 0
push 0
push dword [ebp - 0x4bc]
call fcn.00453f80
add esp, 0x10
push ebx
call fcn.00592c4b
push dword [ebp - 0x4b0]
call fcn.00592c4b
add esp, 8
mov ax, di
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 2
pop esi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret