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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], 0
cmp dword [ecx + 0xf54], 0
push esi
push edi
je 0x405c4a
cmp dword [ecx + 0xf5c], 0
jne 0x405978
cmp dword [ecx + 0xf70], 0
je 0x405978
push 0x124
push 2
push 0x11
push dword [ecx]
call fcn.00406ba3
cmp eax, 6
jne 0x405c78
push 3
mov ecx, dword [ebp - 0xc]
push 0x80000000
call fcn.004056f2
mov dword [ebp - 0x24], eax
cmp eax, 0xffffffff
je 0x405c4a
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], 0
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x405c4a
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
cmp edx, 5
jge 0x4059ef
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0x20], ecx
mov eax, dword [ecx]
mov dword [ebp - 8], 1
mov dword [eax], edx
jmp 0x405a00
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0x20], ecx
mov eax, dword [ecx]
mov dword [eax], 4
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x20]
mov eax, dword [ecx + eax*4]
inc dword [ebp - 8]
push eax
mov ecx, dword [ebx]
mov dword [edx + 0x10], eax
call fcn.00406c70
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x20]
inc dword [ebp - 8]
mov ebx, dword [ecx + edx*4]
mov ecx, dword [eax]
mov edx, dword [ebp - 8]
mov dword [ecx + 0x10], ebx
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
inc dword [ebp - 8]
mov eax, dword [ebx + edx*4]
mov edx, dword [ebp - 8]
mov dword [ecx + 0x1c], eax
inc dword [ebp - 8]
mov eax, dword [ebx + edx*4]
mov edx, dword [ebp - 8]
lea esi, [ecx + 0xf10]
mov dword [ecx + 0x350], eax
inc dword [ebp - 8]
mov eax, dword [ebx + edx*4]
mov edx, 4
mov dword [ecx + 0x58], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x18]
inc dword [ebp - 8]
mov ebx, dword [ecx + eax*4]
mov dword [esi], ebx
add esi, 4
dec edx
jne 0x405a69
mov eax, dword [ebp - 8]
lea esi, [ecx + eax*4]
cmp dword [esi], 5
jge 0x405aa6
mov eax, dword [ebp - 0xc]
mov ecx, 8
add dword [ebp - 8], 8
add eax, 0xf20
mov edx, dword [esi]
add esi, 4
mov dword [eax], edx
add eax, 4
dec ecx
jne 0x405a99
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 8]
call fcn.004077ff
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
inc dword [ebp - 8]
mov edx, dword [ecx + eax*4]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], edx
inc dword [ebp - 8]
mov edx, dword [ecx + eax*4]
mov dword [ebp - 0x1c], edx
cmp edx, dword [ebp - 0x10]
jle 0x405aef
push 0xc14
push 0x411128
push str.cCardsDown___cCards
call fcn.00408b56
add esp, 0xc
mov dword [ebp - 4], 0
cmp dword [ebp - 0x10], 0
jle 0x405b46
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
lea esi, [ecx + eax*4]
mov ecx, dword [ebp - 0x10]
add dword [ebp - 8], ecx
mov ebx, dword [esi]
mov eax, dword [ebp - 4]
add esi, 4
mov edi, 1
cmp dword [ebp - 0x1c], eax
jle 0x405b1f
xor edi, edi
push edi
mov ecx, dword [ebp - 0xc]
push ebx
mov ecx, dword [ecx + 8]
push dword [ebp - 0x14]
call fcn.0040782e
push edi
mov eax, dword [ebp - 0x20]
push ebx
mov ecx, dword [eax]
call fcn.00406e1c
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x10], eax
jg 0x405b0b
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0xa
jl 0x405ab8
mov eax, dword [ebp - 8]
shl eax, 2
cmp dword [ebp - 0x28], eax
jbe 0x405b6f
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + eax]
mov dword [edx + 0xf58], eax
jmp 0x405b7c
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0xf58], 0x1f4
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x5c], 0
call fcn.00404d24
mov ecx, dword [ebp - 0xc]
push dword [ecx]
call dword [sym.imp.USER32.dll_GetMenu]
mov edi, eax
push 0
push 0x9c4b
mov esi, dword [sym.imp.USER32.dll_EnableMenuItem]
push edi
call esi
push 0
push 0x9c46
push edi
call esi
push 0
push 0x9c4d
push edi
call esi
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x58], 5
jge 0x405be5
push 0
push 0x9c47
push edi
call esi
push 0
jmp 0x405bf1
push 1
push 0x9c47
push edi
call esi
push 1
push 0x9c50
push edi
call esi
mov ecx, dword [ebp - 0xc]
push dword [ecx]
call dword [sym.imp.USER32.dll_DrawMenuBar]
mov ecx, dword [ebp - 0xc]
call fcn.0040417c
mov ecx, dword [ebp - 0xc]
push 1
push 0
mov esi, dword [sym.imp.USER32.dll_InvalidateRect]
push dword [ecx]
mov dword [ecx + 0xf5c], 0
call esi
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.00402c89
push 0
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0xc]
push dword [ecx]
call esi
mov ecx, dword [ebp - 0xc]
call fcn.00405690
jmp 0x405c78
cmp dword [ebp - 0x24], 0xffffffff
je 0x405c59
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x18], 0
je 0x405c68
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0
mov ecx, dword [ebp - 0xc]
push 2
push 0x12
push dword [ecx]
call fcn.00406ba3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret