Function at 0x40f0b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x184
mov eax, dword [0x43800c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x438bac]
push ebx
mov ebx, ecx
push 0
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
lea edx, [ebp - 0x16c]
sub edx, eax
nop dword [eax + eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x40f0e0
lea ecx, [ebp - 0x16c]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40f0f4
mov eax, dword [str.Riddles_]
mov dword [ecx], eax
mov eax, dword [0x433618]
push esi
mov dword [ecx + 4], eax
mov al, byte [0x43361c]
push edi
mov byte [ecx + 8], al
lea eax, [ebp - 0x68]
push 0xa
push eax
push dword [ebx + 0x813d0]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__itoa]
lea edx, [ebp - 0x68]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x40f131
lea edi, [ebp - 0x16c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40f141
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, [ebp - 0x16c]
dec ecx
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x40f160
mov eax, dword [str..rdl]
mov dword [ecx], eax
mov al, byte [0x433624]
mov byte [ecx + 4], al
lea eax, [ebp - 0x16c]
push 0x433628
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
add esp, 8
mov edi, eax
mov ecx, ebx
mov dword [ebp - 0x184], edi
call fcn.0040eda0
mov edx, dword [ebx + 0x813d0]
lea ecx, [edx - 1]
cmp ecx, 9
ja 0x40f23c
cmp edx, 1
jne 0x40f1de
mov dword [ebx + 0x81400], 0x60
mov dword [ebx + 0x81404], 0x36
mov dword [ebx + 0x81408], 0xc
mov dword [ebx + 0x8140c], 0xc
jmp 0x40f20e
lea eax, [edx - 2]
cmp eax, 8
ja 0x40f20e
mov dword [ebx + 0x81400], 0xc0
mov dword [ebx + 0x81404], 0x6c
mov dword [ebx + 0x81408], 6
mov dword [ebx + 0x8140c], 6
mov ecx, dword [ebx + 0x81408]
mov eax, dword [ebx + 0x81400]
imul eax, ecx
mov dword [ebx + 0x81410], 0x1e
mov dword [ebx + 0x81418], eax
mov eax, dword [ebx + 0x81404]
imul eax, ecx
mov dword [ebx + 0x8141c], eax
lea eax, [edx - 0xb]
cmp eax, 0x3b
ja 0x40f28a
mov dword [ebx + 0x81400], 0xc0
mov dword [ebx + 0x81404], 0x6c
mov dword [ebx + 0x81408], 6
mov dword [ebx + 0x8140c], 6
mov dword [ebx + 0x81410], 0x1e
mov dword [ebx + 0x81418], 0x480
mov dword [ebx + 0x8141c], 0x288
lea eax, [edx - 0x47]
cmp eax, 0x27
ja 0x40f2d8
mov dword [ebx + 0x81400], 0x92
mov dword [ebx + 0x81404], 0x92
mov dword [ebx + 0x81408], 6
mov dword [ebx + 0x8140c], 6
mov dword [ebx + 0x81410], 0xdc
mov dword [ebx + 0x81418], 0x36c
mov dword [ebx + 0x8141c], 0x36c
xor ecx, ecx
mov dword [ebp - 0x178], ecx
cmp dword [ebx + 0x81404], ecx
jle 0x40f46e
lea eax, [ebx + 0xa8]
mov dword [ebp - 0x180], eax
mov dword [ebp - 0x170], eax
nop
cmp dword [ebx + 0x81400], 0
mov dword [ebp - 0x17c], 0
jle 0x40f448
mov esi, eax
nop dword [eax]
mov eax, dword [esi]
push edi
push 1
add eax, 0x24
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edi, dword [esi]
add esp, 0x10
mov edx, dword [edi + 0x24]
test edx, edx
je 0x40f3ea
cmp edx, 0xffffff
je 0x40f3ea
mov eax, edx
shr eax, 8
movzx ecx, al
movzx eax, dl
add eax, 0xff00
shr edx, 0x10
shl eax, 8
add ecx, eax
movzx eax, dl
shl ecx, 8
add ecx, eax
mov dword [edi + 0x24], ecx
xor ecx, ecx
mov eax, dword [esi]
mov dword [eax + 8], 1
inc dword [ebx + 0x81420]
mov eax, dword [esi]
mov edi, dword [ebx + 0x81428]
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x174], eax
test edi, edi
jle 0x40f3ba
lea eax, [ebx + 0x80f28]
nop dword [eax]
mov edx, dword [eax]
mov edi, dword [ebp - 0x174]
cmp dword [edx], edi
mov edi, dword [ebx + 0x81428]
je 0x40f3e5
inc ecx
add eax, 4
cmp ecx, edi
jl 0x40f3a0
mov eax, dword [ebx + edi*4 + 0x80f28]
mov ecx, dword [ebp - 0x174]
mov dword [eax], ecx
mov eax, dword [ebx + 0x81428]
mov eax, dword [ebx + eax*4 + 0x80f28]
mov dword [eax + 0x2c], 1
inc dword [ebx + 0x81428]
jmp 0x40f3f1
inc dword [edx + 0x2c]
jmp 0x40f3f1
mov dword [edi + 8], 4
mov ecx, dword [esi]
mov eax, dword [ebx + 0x8140c]
mov edi, dword [ebp - 0x184]
mov dword [ecx + 0x14], eax
mov eax, dword [esi]
mov byte [eax + 0x1e], 0
mov eax, dword [esi]
mov byte [eax + 0x1f], 0
mov eax, dword [esi]
mov byte [eax + 0x1d], 0
mov eax, dword [esi]
mov byte [eax + 0x20], 0
mov eax, dword [esi]
add esi, 4
mov byte [eax + 0x1c], 0
mov eax, dword [ebp - 0x17c]
inc eax
mov dword [ebp - 0x17c], eax
cmp eax, dword [ebx + 0x81400]
jl 0x40f320
mov ecx, dword [ebp - 0x178]
mov eax, dword [ebp - 0x170]
inc ecx
add eax, 0x6e0
mov dword [ebp - 0x178], ecx
mov dword [ebp - 0x170], eax
cmp ecx, dword [ebx + 0x81404]
jl 0x40f300
lea edi, [ebx + 0xa8]
jmp 0x40f47a
lea edi, [ebx + 0xa8]
mov dword [ebp - 0x180], edi
mov ecx, ebx
call fcn.0040d830
mov esi, dword [ebx + 0x81428]
mov ecx, dword [ebx + 0x810f8]
push 7
mov eax, dword [ebx + esi*4 + 0x80f24]
mov eax, dword [eax + 0x18]
sub eax, dword [ebx + 0x8141c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebx + 0x81414], eax
mov eax, dword [ebx + esi*4 + 0x80f24]
mov eax, dword [eax + 0x18]
sub eax, dword [ecx + 0x24]
sub eax, 0xa
mov dword [ecx + 0x1c], eax
mov ecx, ebx
mov eax, dword [ebx + 0x810f8]
movd xmm0, dword [eax + 0x1c]
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4336ac]
movss dword [esp], xmm0
push 7
call fcn.0042e3a0
push 7
mov ecx, ebx
call fcn.0042d4b0
push ecx
fstp dword [esp]
push 8
mov ecx, ebx
call fcn.0042e3a0
mov eax, dword [ebx + 0x810f8]
mov ecx, ebx
push 9
movd xmm0, dword [eax + 0x1c]
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4336ac]
movss dword [esp], xmm0
push 9
call fcn.0042e3a0
push 9
mov ecx, ebx
call fcn.0042d4b0
push ecx
fstp dword [esp]
push 0xa
mov ecx, ebx
call fcn.0042e3a0
mov eax, dword [ebx + 0x810f8]
mov ecx, ebx
push 0xb
movd xmm0, dword [eax + 0x1c]
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4336ac]
movss dword [esp], xmm0
push 0xb
call fcn.0042e3a0
push 0xb
mov ecx, ebx
call fcn.0042d4b0
push ecx
fstp dword [esp]
push 0xc
mov ecx, ebx
call fcn.0042e3a0
push 0xb
mov ecx, ebx
call fcn.0042d4b0
fstp dword [ebp - 0x170]
push 0xb
mov ecx, ebx
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
addss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
addss xmm0, dword [0x432bac]
movss dword [esp], xmm0
push 0xd
call fcn.0042e3a0
mov ecx, dword [ebx + 0x810fc]
call fcn.0041d970
mov ecx, dword [ebx + 0x810fc]
mov esi, ecx
push 0x12
mov eax, dword [ecx + 0x60]
add eax, dword [ecx + 0x58]
mov ecx, ebx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
call fcn.0042d140
mov ecx, dword [esi + 0x5c]
sub esp, 8
mov eax, dword [esi + 0x54]
add ecx, 0xa
fsubr dword [ebp - 0x170]
add eax, ecx
mov ecx, ebx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
fstp dword [esp + 4]
movss dword [esp], xmm0
push 0x12
call fcn.0042e170
push 0x12
mov ecx, ebx
call fcn.0042d4b0
fstp dword [ebp - 0x170]
push 0x13
mov ecx, ebx
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4324e8]
movss dword [esp], xmm0
push 0x12
call fcn.0042d340
push ecx
fstp dword [esp]
push 0x13
mov ecx, ebx
call fcn.0042e170
push 0x13
mov ecx, ebx
call fcn.0042d4b0
fstp dword [ebp - 0x170]
push 0x14
mov ecx, ebx
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
subss xmm0, dword [0x4324e8]
movss dword [esp], xmm0
mov ecx, ebx
push 0x12
call fcn.0042d340
push ecx
fstp dword [esp]
push 0x14
mov ecx, ebx
call fcn.0042e170
push 0x14
mov ecx, ebx
call fcn.0042d4b0
fstp dword [ebp - 0x170]
push 0x15
mov ecx, ebx
call fcn.0042d140
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4324e8]
movss dword [esp], xmm0
push 0x12
call fcn.0042d340
push ecx
fstp dword [esp]
push 0x15
mov ecx, ebx
call fcn.0042e170
mov eax, dword [ebx + 0x810fc]
sub esp, 8
movd xmm0, dword [eax + 0x58]
mov ecx, dword [eax + 0x5c]
mov eax, dword [eax + 0x54]
add ecx, 5
cvtdq2ps xmm0, xmm0
add eax, ecx
mov ecx, ebx
movss dword [esp + 4], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp], xmm0
push 3
call fcn.0042e170
mov ecx, ebx
call fcn.0040fbc0
mov eax, dword [ebx + 0x810fc]
mov ecx, ebx
push 7
movd xmm0, dword [eax + 0x5c]
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
call fcn.0042d1c0
fsubr dword [ebp - 0x170]
mov eax, dword [ebx + 0x810fc]
push ecx
mov ecx, ebx
movd xmm0, dword [eax + 0x54]
fmul dword [0x432ba8]
cvtdq2ps xmm0, xmm0
fstp dword [ebp - 0x170]
addss xmm0, dword [ebp - 0x170]
movss dword [esp], xmm0
push 7
call fcn.0042e2a0
push 7
mov ecx, ebx
call fcn.0042d340
push ecx
fstp dword [esp]
push 8
mov ecx, ebx
call fcn.0042e2a0
push 7
mov ecx, ebx
call fcn.0042d340
fstp dword [ebp - 0x170]
push 9
mov ecx, ebx
call fcn.0042d1c0
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
subss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
subss xmm0, dword [0x4336ac]
movss dword [esp], xmm0
push 9
call fcn.0042e2a0
push 9
mov ecx, ebx
call fcn.0042d340
push ecx
fstp dword [esp]
push 0xa
mov ecx, ebx
call fcn.0042e2a0
push 7
mov ecx, ebx
call fcn.0042d340
fstp dword [ebp - 0x170]
push 7
mov ecx, ebx
call fcn.0042d1c0
movss xmm0, dword [ebp - 0x170]
fstp dword [ebp - 0x174]
addss xmm0, dword [ebp - 0x174]
push ecx
mov ecx, ebx
addss xmm0, dword [0x4336ac]
movss dword [esp], xmm0
push 0xb
call fcn.0042e2a0
push 0xb
mov ecx, ebx
call fcn.0042d340
push ecx
fstp dword [esp]
push 0xc
mov ecx, ebx
call fcn.0042e2a0
push 0xb
mov ecx, ebx
call fcn.0042d1c0
fstp dword [ebp - 0x170]
push 0xd
mov ecx, ebx
call fcn.0042d1c0
fsubr dword [ebp - 0x170]
push 0xb
mov ecx, ebx
fmul dword [0x432ba8]
fstp dword [ebp - 0x170]
call fcn.0042d340
fadd dword [ebp - 0x170]
push ecx
mov ecx, ebx
fstp dword [esp]
push 0xd
call fcn.0042e2a0
mov eax, dword [0x438740]
mov ecx, ebx
push 7
mov esi, dword [eax + 0x58]
call fcn.0042d4b0
mov eax, dword [0x438740]
mov ecx, ebx
mov eax, dword [eax + 0x58]
movd xmm0, dword [eax + 0x55c]
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
fsub dword [ebp - 0x170]
fsub dword [0x4336a4]
fstp dword [ebp - 0x170]
cvttss2si eax, dword [ebp - 0x170]
push eax
push 7
call fcn.0042d240
mov eax, dword [esi + 0x560]
cdq
sub eax, edx
sar eax, 1
mov ecx, esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [ebp - 0x170], xmm0
fsub dword [ebp - 0x170]
fstp dword [ebp - 0x170]
cvttss2si eax, dword [ebp - 0x170]
push eax
call fcn.004195d0
mov ecx, dword [ebx + 0x810fc]
mov esi, dword [ebx + 0x810f8]
mov dword [ebp - 0x174], 0
mov eax, dword [ecx + 0x5c]
sub eax, dword [esi + 0x20]
cdq
sub eax, edx
sar eax, 1
add eax, dword [ecx + 0x54]
mov dword [esi + 0x18], eax
cmp dword [ebx + 0x81404], 0
mov ecx, dword [ebx + 0x81414]
mov dword [ebp - 0x170], ecx
jle 0x40fb77
mov eax, dword [ebx + 0x8140c]
nop dword [eax]
mov edx, dword [ebx + 0x81410]
xor esi, esi
cmp dword [ebx + 0x81400], esi
jle 0x40fa40
movd xmm1, ecx
mov ecx, edi
cvtdq2ps xmm1, xmm1
nop dword [eax]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
movd xmm0, edx
inc esi
cvtdq2ps xmm0, xmm0
movss dword [eax + 0xc], xmm0
mov eax, dword [ecx - 4]
movss dword [eax + 0x10], xmm1
mov eax, dword [ebx + 0x8140c]
add edx, eax
cmp esi, dword [ebx + 0x81400]
jl 0x40fa10
mov ecx, dword [ebp - 0x170]
mov edx, dword [ebp - 0x174]
add ecx, eax
mov esi, dword [ebx + 0x81404]
inc edx
add edi, 0x6e0
mov dword [ebp - 0x170], ecx
mov dword [ebp - 0x174], edx
cmp edx, esi
jl 0x40f9f0
xor eax, eax
mov dword [ebp - 0x170], eax
test esi, esi
jle 0x40fb77
xor esi, esi
lea ecx, [ebx + 0xa8]
mov dword [ebp - 0x174], esi
cmp dword [ebx + 0x81400], 0
mov dword [ebp - 0x178], 0
jle 0x40fb4c
mov eax, ecx
mov dword [ebp - 0x17c], ecx
mov ecx, dword [ebx + 0x81428]
xor edx, edx
test ecx, ecx
jle 0x40fb18
mov eax, dword [eax]
mov edi, dword [eax + 0x24]
lea eax, [ebx + 0x80f28]
nop dword [eax]
mov esi, dword [eax]
cmp edi, dword [esi]
je 0x40fad0
inc edx
add eax, 4
cmp edx, ecx
jl 0x40fac0
jmp 0x40fb12
mov edi, dword [ebp - 0x174]
add esi, 0x34
add edi, dword [ebp - 0x178]
mov ecx, dword [ebx + edi*4 + 0xa8]
add ecx, 0x2c
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x40faf0
mov eax, dword [ebx + edx*4 + 0x80f28]
mov ecx, dword [ebx + edi*4 + 0xa8]
mov eax, dword [eax + 0xc]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp - 0x17c]
mov ecx, dword [ebp - 0x178]
add eax, 4
inc ecx
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0x178], ecx
cmp ecx, dword [ebx + 0x81400]
jl 0x40faa2
mov esi, dword [ebp - 0x174]
mov eax, dword [ebp - 0x170]
mov ecx, dword [ebp - 0x180]
inc eax
add ecx, 0x6e0
add esi, 0x1b8
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x180], ecx
mov dword [ebp - 0x174], esi
cmp eax, dword [ebx + 0x81404]
jl 0x40fa83
mov ecx, dword [ebx + 0x810fc]
pop edi
pop esi
cmp dword [ecx + 0x50], 1
jne 0x40fb8a
call fcn.0041db90
mov ecx, ebx
call fcn.0040e160
mov ecx, ebx
call fcn.0040e2a0
push dword [ebp - 0x184]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop ebx
call fcn.0042e5e7
mov esp, ebp
pop ebp
ret