Function at 0x50eac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x42c
mov eax, dword [0x5c4008]
xor eax, esp
mov dword [esp + 0x428], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x24], eax
push edi
mov ecx, 0x70a6a4
mov dword [esp + 0x18], esi
call fcn.0056b0a5
mov ecx, dword [ebp + 8]
lea edx, [esp + 0x48]
xor al, al
mov dword [esp + 0x1c], 0
xor ebx, ebx
mov dword [esp + 0x2c], 0
mov byte [esp + 0x13], al
sub edx, ecx
mov byte [esi + 0x41a8], 1
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x50eb20
mov edx, dword [esp + 0x28]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x50eb33
lea edi, [esp + 0x48]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50eb41
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x48]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x50eb60
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00555564
mov esi, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [esi + 0x4014]
mov dword [esi + ecx*4 + 0x40e0], eax
lea ecx, [esp + 0x48]
mov eax, dword [esi + 0x4014]
mov edx, dword [esi + eax*4 + 0x40e0]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx], al
lea edx, [edx + 1]
test al, al
jne 0x50eb97
lea eax, [esp + 0x48]
push 0x5b1154
push eax
call fcn.00556c35
mov edi, eax
add esp, 8
mov dword [esp + 0x14], edi
test edi, edi
je 0x50ef54
lea eax, [esp + 0x48]
push eax
push str.Adding_file__s
push 0
call fcn.004e9620
add esp, 0xc
lea eax, [esp + 0x34]
push edi
push 0x14
push 1
push eax
call fcn.00557dc6
add esp, 0x10
cmp eax, 0x14
jne 0x50ef54
cmp byte [esi + 0x41a9], bl
jne 0x50ece9
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50ece9
cmp eax, 0x1e
ja 0x50ef54
lea esi, [eax + eax*4]
shl esi, 2
push esi
call fcn.00555564
add esp, 4
mov dword [esp + 0x1c], eax
mov edx, esi
mov ecx, eax
push edi
call fcn.005175e0
add esp, 4
cmp eax, esi
jne 0x50ef27
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x34]
mov ecx, dword [esi + 0x4010]
lea edx, [eax + ecx*4]
movzx eax, word [edx]
cmp eax, dword [0x5ce518]
jl 0x50ec88
add edx, 4
movzx eax, word [edx - 2]
cmp eax, dword [0x5ce514]
jl 0x50ec88
lea eax, [edi - 1]
cmp ecx, eax
je 0x50ec93
inc ecx
mov dword [esi + 0x4010], ecx
movzx eax, word [edx]
add edx, 4
cmp eax, dword [0x5ce518]
jge 0x50ec60
test ecx, ecx
jle 0x50ec93
dec ecx
mov dword [esi + 0x4010], ecx
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + ecx*4]
movzx edx, word [edx + ecx*4 + 2]
mov dword [0x5cdf68], eax
mov dword [0x5cdf64], edx
push edx
push eax
push ecx
cmp edi, 1
jbe 0x50ecba
push str.Selected_resolution:_i___i__i_
jmp 0x50ecbf
push str.Working_resolution:_i___i__i_
push 0
call fcn.004e9620
mov eax, dword [esp + 0x30]
add esp, 0x14
test eax, eax
je 0x50ecde
push eax
call fcn.005550e4
add esp, 4
mov dword [esp + 0x1c], ebx
mov edi, dword [esp + 0x14]
mov byte [esi + 0x41a9], 1
push 0
push 0
push dword [esp + 0x48]
push edi
call fcn.005575dd
add esp, 0x10
test eax, eax
jne 0x50ef27
cmp dword [esp + 0x3c], 0x1e8480
ja 0x50ef27
mov eax, dword [esp + 0x38]
cmp eax, 0x1e8480
ja 0x50ef27
push eax
call fcn.00555564
mov edx, dword [esp + 0x3c]
add esp, 4
mov ecx, eax
mov dword [esp + 0x20], eax
push edi
call fcn.005175e0
add esp, 4
cmp eax, dword [esp + 0x38]
jne 0x50ef05
push dword [esp + 0x3c]
call fcn.00555564
mov edx, dword [esp + 0x3c]
add esp, 4
mov ecx, dword [esp + 0x20]
mov edi, eax
mov dword [esp + 0x2c], edi
push dword [esp + 0x3c]
push edi
call fcn.00506ba0
mov ecx, dword [esp + 0x44]
add esp, 8
cmp eax, ecx
jne 0x50ef01
mov eax, dword [esp + 0x20]
test eax, eax
je 0x50ed93
push eax
call fcn.005550e4
add esp, 4
xor ecx, ecx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x44], ebx
jbe 0x50eee3
lea eax, [ebx + 8]
mov dword [esp + 0x24], eax
cmp eax, ecx
ja 0x50ef01
mov eax, dword [ebx + edi]
lea edx, [ebx + edi]
mov dword [esp + 0x30], edx
test eax, eax
js 0x50ef01
cmp eax, 6
jge 0x50ef01
mov edx, dword [edx + 4]
mov ebx, dword [esp + 0x24]
lea eax, [edx + edx*2]
lea ebx, [ebx + eax*8]
cmp ebx, ecx
ja 0x50ef01
cmp edx, 0x64
ja 0x50ef01
add dword [esp + 0x24], edi
lea edx, [ebx + edi]
cmp byte [edx], 0
mov eax, ebx
je 0x50ee02
cmp ebx, ecx
jae 0x50ee02
inc ebx
cmp byte [ebx + edi], 0
jne 0x50edf7
inc ebx
mov ecx, ebx
sub ecx, eax
and ecx, reloc.WS2_32.dll_closesocket
jns 0x50ee14
dec ecx
or ecx, 0xfffffffc
inc ecx
test ecx, ecx
jle 0x50ee21
mov eax, 4
sub eax, ecx
add ebx, eax
push ecx
push edx
mov ecx, esi
call fcn.0050eff0
mov edx, dword [esp + 0x30]
lea edi, [eax*4]
mov eax, dword [esi + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [esi + 0x4014]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x18]
mov edx, dword [edx + 4]
mov esi, dword [esi + 0x4010]
mov eax, dword [eax + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
mov dword [ecx + 0x20], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 0x4014]
mov dword [ecx + 0x14], eax
xor eax, eax
mov ecx, dword [esp + 0x24]
cmp esi, edx
cmovge esi, eax
lea eax, [esi + esi*2]
mov esi, dword [esp + 0x18]
lea edx, [ecx + eax*8]
mov eax, dword [esi + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [edx + 0x10]
mov dword [ecx + 0x18], eax
mov eax, dword [edx + 0x14]
mov dword [ecx + 0x1c], eax
mov eax, dword [esi + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [edx + 4]
mov dword [ecx + 0x24], eax
mov eax, dword [esi + 0x4004]
mov ecx, dword [edi + eax]
mov eax, dword [edx]
mov edx, dword [esp + 0x28]
inc edx
mov dword [ecx + 0x28], eax
mov dword [esp + 0x28], edx
cmp edx, dword [esp + 0x44]
jae 0x50eee3
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
jmp 0x50eda1
mov eax, dword [esi + 0x4014]
mov edi, dword [esp + 0x14]
mov byte [esp + 0x13], 1
mov dword [esi + eax*4 + 0x4018], edi
inc dword [esi + 0x4014]
jmp 0x50ef05
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x50ef16
push eax
call fcn.005550e4
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x50ef27
push eax
call fcn.005550e4
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x50ef38
push eax
call fcn.005550e4
add esp, 4
mov bl, byte [esp + 0x13]
test bl, bl
je 0x50ef50
mov eax, dword [esp + 0x18]
mov byte [eax + 0x41a8], 0
jmp 0x50efd3
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x4014]
mov eax, dword [esi + eax*4 + 0x40e0]
test eax, eax
je 0x50ef7f
push eax
call fcn.005550e4
mov eax, dword [esi + 0x4014]
add esp, 4
mov dword [esi + eax*4 + 0x40e0], 0
test edi, edi
je 0x50ef8c
push edi
call fcn.005572b0
add esp, 4
xor ecx, ecx
cmp dword [esi + 0x4008], ecx
jle 0x50efcd
nop word [eax + eax]
mov eax, dword [esi + 0x4004]
mov edx, dword [eax + ecx*4]
mov eax, dword [edx + 0x14]
cmp eax, dword [esi + 0x4014]
jne 0x50efbb
mov dword [edx + 0x14], 0xffffffff
inc ecx
cmp ecx, dword [esi + 0x4008]
jl 0x50efa0
mov byte [esi + 0x41a8], 0
jmp 0x50efd3
mov byte [esi + 0x41a8], cl
mov ecx, dword [esp + 0x434]
mov al, bl
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00551170
mov esp, ebp
pop ebp
ret 8