Function at 0x500690
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xf0
mov eax, dword [esp + 0xf4]
push ebx
push esi
push 0
push 0x80
push 3
push 0
push 0
push connect
mov ebx, ecx
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x500e1c
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x10]
push ecx
push 4
lea edx, [esp + 0x24]
push edx
push esi
call edi
test eax, eax
je 0x500710
cmp dword [esp + 0x18], 0x6111101
jne 0x500710
push 0
lea eax, [esp + 0x10]
push eax
push 4
lea ecx, [esp + 0x1c]
push ecx
push esi
call edi
test eax, eax
je 0x500710
mov edx, dword [esp + 0x10]
cmp edx, dword [0x6cac40]
je 0x500723
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0xf0
ret 4
push 0
lea eax, [esp + 0x10]
push eax
push 0xe0
lea ecx, [esp + 0x28]
push ecx
push esi
call edi
push esi
test eax, eax
je 0x500711
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1f3
mov ecx, 0x6830f8
call fcn.004412c0
cmp dword [ebx + 0x1c], 0
mov esi, eax
je 0x500777
mov eax, dword [esp + 0x24]
xor edx, edx
cmp dword [esi + 0x10], eax
setne dl
test dl, 1
je 0x500777
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov edi, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x20]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x50079f
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
push 0x539
mov ecx, 0x6830f8
call fcn.004412c0
cmp dword [ebx + 0x1c], 0
mov esi, eax
je 0x5007d1
mov eax, dword [esp + 0x48]
mov edx, dword [esi]
mov edx, dword [edx + 8]
and eax, 1
push eax
mov ecx, esi
call edx
mov eax, dword [esp + 0x48]
and eax, 1
mov dword [ebx + 0x20], eax
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x40]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x5007f8
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
push 0x1eb
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0x54]
mov ebp, dword [esp + 0x50]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500830
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
fld dword [esi + 0x248]
call fcn.00599920
cmp eax, 0x3d1
jne 0x500867
fld dword [esi + 0x24c]
call fcn.00599920
cmp eax, 0xbb
jne 0x500867
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push 0xd1
push 0x3d1
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x5008ac
mov eax, dword [esp + 0x58]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x50088f
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0x58]
test al, 4
je 0x500897
push 1
jmp 0x5008a5
test al, 8
je 0x50089f
push 2
jmp 0x5008a5
test al, 0x10
je 0x5008ac
push 3
mov ecx, esi
call fcn.00467a10
push 0xfd
mov ecx, 0x6830f8
call fcn.004412c0
cmp dword [ebx + 0x1c], 0
mov esi, eax
mov eax, dword [esp + 0x68]
je 0x5008e5
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x5008e5
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0x68]
and eax, 2
push eax
mov ecx, esi
call fcn.004484c0
mov edi, dword [esp + 0x64]
mov ebp, dword [esp + 0x60]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500917
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
fld dword [esi + 0x248]
call fcn.00599920
cmp eax, 0x1d0
jne 0x50094a
fld dword [esi + 0x24c]
call fcn.00599920
cmp eax, 0x2d6
jne 0x50094a
mov edx, dword [esi]
push eax
mov eax, dword [edx + 0x24]
push 0x1a6
mov ecx, esi
call eax
push 0x13d
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x70]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500982
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500a19
mov eax, dword [esp + 0x78]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x5009ae
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0x78]
test al, 4
je 0x5009b6
push 1
jmp 0x5009c4
test al, 8
je 0x5009be
push 2
jmp 0x5009c4
test al, 0x10
je 0x5009cb
push 4
mov ecx, esi
call fcn.004d6390
mov ebp, dword [esp + 0x7c]
mov ecx, esi
call fcn.004d5d80
movzx edi, al
cmp ebp, edi
je 0x500a06
lea ecx, [ecx]
cmp ebp, edi
push 0x40
mov ecx, esi
push 0
jle 0x5009f7
push 0x14b
call fcn.004d6600
inc edi
jmp 0x500a02
push 0x14c
call fcn.004d6600
dec edi
cmp edi, ebp
jne 0x5009e0
test dword [esp + 0x78], 0x100
jne 0x500a19
push 0
mov ecx, esi
call fcn.004d5dd0
push 0x68c
mov ecx, 0x6830f8
call fcn.004412c0
test eax, eax
je 0x500a46
cmp dword [ebx + 0x1c], 0
je 0x500a46
mov ecx, dword [esp + 0x78]
mov edx, dword [eax]
mov edx, dword [edx + 8]
and ecx, 0x100
push ecx
mov ecx, eax
call edx
push 0x103
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0x84]
mov ebp, dword [esp + 0x80]
push edi
mov esi, eax
push ebp
lea eax, [esi + 0x284]
push eax
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500a84
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500ad1
mov eax, dword [esp + 0x88]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500ab2
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0x88]
test al, 4
je 0x500aba
push 1
jmp 0x500ac8
test al, 8
je 0x500ac2
push 2
jmp 0x500ac8
test al, 0x10
je 0x500ad1
push 3
mov edx, dword [esi]
mov eax, dword [edx + 0x68]
mov ecx, esi
call eax
push 0x6b
mov ecx, 0x6830f8
call fcn.004412c0
cmp dword [ebx + 0x1c], 0
mov esi, eax
je 0x500b06
mov eax, dword [esp + 0x98]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500b06
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov edi, dword [esp + 0x94]
mov ebp, dword [esp + 0x90]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500b33
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
push 0xd7
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0xa4]
mov ebp, dword [esp + 0xa0]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500b71
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500beb
mov ecx, dword [esi + 0x2a8]
mov edx, dword [esp + 0xac]
mov dword [ecx + 0x32c], edx
mov eax, dword [esp + 0xa8]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500bb2
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0xa8]
test al, 4
je 0x500beb
mov edx, dword [esi]
mov eax, dword [edx + 0x68]
push 1
mov ecx, esi
call eax
mov al, byte [esp + 0xa8]
test al, 0x20
je 0x500bd0
push 1
jmp 0x500bde
test al, 0x40
je 0x500bd8
push 2
jmp 0x500bde
test al, al
jns 0x500beb
push 3
mov ecx, dword [0x69386c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x68]
call eax
push 0x359
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0xb4]
mov ebp, dword [esp + 0xb0]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500c29
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500c76
mov eax, dword [esp + 0xb8]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500c57
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
mov eax, dword [esp + 0xb8]
test al, 4
je 0x500c5f
push 1
jmp 0x500c6d
test al, 8
je 0x500c67
push 2
jmp 0x500c6d
test al, 0x10
je 0x500c76
push 3
mov edx, dword [esi]
mov eax, dword [edx + 0x68]
mov ecx, esi
call eax
push 0x5ca
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0xc4]
mov ebp, dword [esp + 0xc0]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500cb4
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500cdb
mov eax, dword [esp + 0xc8]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500cdb
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
push 0x564
mov ecx, 0x6830f8
call fcn.004412c0
mov esi, eax
test esi, esi
je 0x500d44
mov edi, dword [esp + 0xd4]
mov ebp, dword [esp + 0xd0]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500d1d
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500d44
mov eax, dword [esp + 0xd8]
xor ecx, ecx
cmp dword [esi + 0x10], eax
setne cl
test cl, 1
je 0x500d44
mov edx, dword [esi]
and eax, 1
push eax
mov eax, dword [edx + 8]
mov ecx, esi
call eax
push 0x220
mov ecx, 0x6830f8
call fcn.004412c0
mov edi, dword [esp + 0xe4]
mov ebp, dword [esp + 0xe0]
push edi
mov esi, eax
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, ebx
call fcn.00500630
test eax, eax
je 0x500d82
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
cmp dword [ebx + 0x1c], 0
je 0x500dbc
test byte [esp + 0xe8], 1
mov ecx, 0x693908
je 0x500d9b
push 0
jmp 0x500d9d
push 1
call fcn.0046fd20
test byte [esp + 0xec], 1
mov ecx, 0x693908
je 0x500db5
push 0
jmp 0x500db7
push 1
call fcn.0046fd30
mov eax, dword [esp + 0xfc]
mov ebx, eax
mov ecx, 0x6830f8
test eax, eax
jne 0x500dd5
push 0x748
jmp 0x500dda
push 0x75b
call fcn.004412c0
mov esi, eax
test esi, esi
je 0x500e1a
mov edi, dword [esp + 0xf4]
mov ebp, dword [esp + 0xf0]
push edi
push ebp
lea ecx, [esi + 0x284]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.00500630
test eax, eax
je 0x500e14
mov edx, dword [esi]
mov eax, dword [edx + 0x24]
push edi
push ebp
mov ecx, esi
call eax
mov dword [0x6a40c0], ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0xf0
ret 4