Function at 0x42cf3e
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 0x300
call fcn.0046145c
lea ecx, [edi + 0xf00]
mov dword [ebp - 4], ecx
add esp, 4
mov edx, dword [ebp + 0x10]
cmp edx, 1
jne 0x42d129
xor ecx, ecx
mov ebx, dword [ebp - 4]
mov dword [esi + 0x2b60], ecx
mov dword [esi + 0x24a8], ecx
mov dword [esi + 0x2b20], ecx
movsx edx, word [ebx + 0x20]
shl edx, 0xa
mov dword [ebp - 0xc], edx
cmp edx, dword [0x476034]
je 0x42cff1
cmp dword [0x476038], ecx
je 0x42cfc6
push dword [0x476038]
call dword [sym.imp.KERNEL32.DLL_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push dword [0x476038]
call dword [sym.imp.KERNEL32.DLL_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
push dword [ebp - 0xc]
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
test eax, eax
mov dword [0x476038], eax
jne 0x42cfe6
pop edi
mov eax, 0xffffff9f
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
mov dword [0x476034], edx
jmp 0x42d003
mov ecx, dword [edi + 0xf2c]
cmp ecx, dword [0x47603c]
je 0x42d1b2
mov ecx, dword [edi + 0xf2c]
mov dword [0x47603c], ecx
mov dword [0x476040], 0
cmp word [ebx + 0x16], 0
je 0x42d1c2
movsx edx, word [ebx + 0x20]
mov eax, edx
mov dword [0x476044], edx
movsx ecx, word [ebx + 0x16]
cdq
idiv ecx
mov edx, 0x476044
sub edx, eax
mov dword [0x476044], eax
mov dword [0x476048], edx
mov ecx, dword [edi + 0xf30]
push 0
push 0
mov dword [ebp - 0x10], ecx
push dword [ebp - 0x10]
push dword [0x47603c]
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov edx, dword [ebx + 4]
mov eax, edx
mov dword [0x47604c], edx
movsx ecx, word [ebx + 0x20]
cdq
idiv ecx
push dword [0x46f2f0]
push dword [0x46f2ec]
push dword [0x46f2f8]
mov dword [0x47604c], eax
mov dword [0x476050], eax
push dword [0x46f2f4]
call fcn.004623c4
fstp qword [0x476058]
add esp, 0x10
fld qword [edi + 0x72c]
ftst
fnstsw ax
fstp st(0)
sahf
je 0x42d0d0
fld qword [0x476058]
fmul qword [edi + 0x72c]
fld xword [0x46f2fc]
fmulp st(1)
fstp qword [0x476058]
xor edx, edx
mov dword [0x476064], edx
mov dword [0x476060], edx
test dword [esi + 0x2b04], 1
je 0x42d0f6
mov ecx, dword [esi + 0x2b48]
mov dword [0x476060], ecx
test dword [esi + 0x2b04], 2
je 0x42d10e
mov edx, dword [esi + 0x2b4c]
mov dword [0x476064], edx
push edi
push esi
call fcn.00459f20
xor ecx, ecx
mov eax, ecx
mov dword [0x476068], ecx
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
cmp eax, 2
jne 0x42d13d
mov eax, dword [0x476068]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jns 0x42d1bb
cmp dword [esi + 0x2508], 0
jne 0x42d1b2
cmp dword [0x476038], 0
je 0x42d179
push dword [0x476038]
call dword [sym.imp.KERNEL32.DLL_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push dword [0x476038]
call dword [sym.imp.KERNEL32.DLL_GlobalHandle]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
cmp dword [edi + 0xf2c], 0
je 0x42d18e
push dword [0x47603c]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor ebx, ebx
mov dword [0x476038], ebx
mov dword [0x476034], ebx
mov dword [0x47603c], ebx
mov dword [edi + 0xf2c], ebx
mov dword [0x476068], 0x7a
pop edi
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp word [ecx + 0x20], 0
jne 0x42d1ce
pop edi
mov eax, 0x6a
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x476068], 0x7a
jne 0x42d1e3
pop edi
mov eax, 0x7a
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 0xf2c]
test ecx, ecx
mov dword [0x47603c], ecx
jne 0x42d1ff
pop edi
mov eax, 0x72
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x10]
push ecx
push dword [0x476034]
push dword [0x476038]
push dword [0x47603c]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x42d232
mov eax, 0x76
mov dword [0x476068], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x10], 0
jne 0x42d249
mov eax, 0x7a
mov dword [0x476068], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp + 8], esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [ebp + 0xc], edi
movsx esi, word [ecx + 0x20]
xor edx, edx
div esi
mov dword [ebp - 8], eax
cmp dword [0x476060], 0
je 0x42d2cc
mov edx, dword [ebp + 8]
xor edi, edi
mov ebx, dword [edx + 0x24a8]
mov esi, edi
test eax, eax
je 0x42d2cc
push dword [0x476044]
mov ecx, dword [0x476038]
add ecx, esi
push ecx
push dword [0x476048]
call fcn.00460310
lea edx, [ebx + ebx*4]
add edx, edx
fild dword [0x476040]
mov ecx, dword [0x476060]
fmul qword [0x476058]
fstp xword [edx + ecx]
mov ecx, dword [ebp - 4]
movsx edx, word [ecx + 0x20]
add esi, edx
mov edx, dword [ebp + 8]
lea ebx, [ebx + 1]
and ebx, dword [edx + 0x3104]
inc edi
add esp, 0xc
cmp edi, dword [ebp - 8]
jb 0x42d27a
cmp dword [0x476064], 0
je 0x42d352
mov ebx, dword [ebp - 4]
xor esi, esi
mov edi, dword [ebp + 0xc]
cmp word [ebx + 0x16], 1
jle 0x42d2ea
mov esi, dword [0x476044]
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx + 0x24a8]
mov dword [ebp + 0xc], edi
xor edi, edi
cmp dword [ebp - 8], edi
je 0x42d352
push dword [0x476044]
mov edx, dword [0x476038]
add edx, esi
push edx
push dword [0x476048]
call fcn.00460310
lea ecx, [ebx + ebx*4]
add ecx, ecx
fild dword [0x476040]
mov edx, dword [0x476064]
fmul qword [0x476058]
fstp xword [ecx + edx]
mov edx, dword [ebp - 4]
movsx ecx, word [edx + 0x20]
add esi, ecx
mov ecx, dword [ebp + 8]
lea ebx, [ebx + 1]
and ebx, dword [ecx + 0x3104]
inc edi
add esp, 0xc
cmp edi, dword [ebp - 8]
jb 0x42d300
mov edx, dword [ebp - 8]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
sub dword [0x476050], edx
mov ecx, dword [0x476050]
mov dword [ebp - 0x28], ecx
fild dword [ebp - 0x28]
fild dword [0x47604c]
fxch st(1)
fstp qword [ebp - 0x18]
fdivr qword [ebp - 0x18]
cmp dword [0x476050], 0
fstp qword [ebp - 0x18]
jg 0x42d393
cmp dword [edi + 0x688], 0x6a4
jne 0x42d39e
mov edx, dword [ebp - 0x10]
cmp edx, dword [0x476034]
jae 0x42d3a8
mov dword [0x476068], 0x7a
lea ecx, [edi + 0x5c]
push ecx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edx, dword [ebp - 8]
fld qword [ebp - 0x18]
mov dword [esi + 0x24a8], ebx
mov ecx, dword [ebp - 0x2c]
add dword [esi + 0x2b60], edx
fstp qword [esi + 0x2ba0]
push ecx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
push dword [0x479ffc]
call dword [sym.imp.KERNEL32.DLL_SetEvent]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret