Function at 0x41fbc0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
push edi
push ebx
call sym.test_embusb.exe__sys_error_none_4
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0x918]
test esi, esi
jne 0x41fc0a
push 1
call fcn.0040887c
push eax
push 0x36
push 1
push 0x42fd70
call fcn.00408b11
push 0x42fda8
call fcn.00401350
add esp, 0x18
call sym.test_embusb.exe__sys_bomb_0
mov ecx, dword [ebp + 0x18]
xor al, al
mov edi, dword [ebp + 0xc]
mov edx, edi
mov dword [esp + 0x1c], edx
mov byte [esp + 0x1b], al
mov dword [ecx], 0
test edi, edi
je 0x41fdcb
lea edi, [esi + 0x808]
cmp dword [edi], 0
jbe 0x41fc5e
mov eax, dword [esi + 0x80c]
mov ebx, dword [ebp + 0x14]
inc dword [ebp + 0x14]
mov al, byte [eax + esi + 8]
mov byte [ebx], al
dec dword [edi]
inc dword [esi + 0x80c]
inc dword [ecx]
dec edx
mov ebx, dword [ebp + 0x1c]
mov dword [esp + 0x1c], edx
jmp 0x41fd6a
cmp dword [ecx], 0
jbe 0x41fc6d
test byte [ebp + 0x10], 2
jne 0x41fdbb
mov dword [esi + 0x80c], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
test al, al
jne 0x41fca8
push 0x431fe4
push 0
push 1
push dword [0x431fe0]
call sub.KERNEL32.dll_CreateEventA
mov dword [esp + 0x3c], eax
mov byte [esp + 0x1b], 1
lea eax, [esp + 0x2c]
push eax
push edi
push dword [0x42fd6c]
lea eax, [esi + 8]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x920]
call sub.KERNEL32.dll_ReadFile
test al, al
jne 0x41fd5e
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3e5
jne 0x41fd7c
movss xmm0, dword [esi]
xorps xmm1, xmm1
or eax, 0xffffffff
comiss xmm0, xmm1
jbe 0x41fd2e
movsd xmm1, qword [0x426ca0]
sub esp, 8
cvtps2pd xmm0, xmm0
mulsd xmm0, qword [0x427690]
maxsd xmm1, xmm0
addsd xmm1, qword [0x4274d0]
movsd qword [esp + 0x28], xmm1
fld qword [esp + 0x28]
fstp qword [esp]
call fcn.00420ec0
fstp qword [esp + 0x28]
cvttsd2si eax, qword [esp + 0x28]
add esp, 8
push eax
push dword [esp + 0x40]
call sub.KERNEL32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x41fd81
cmp eax, 0xffffffff
je 0x41fd77
push 1
push edi
lea eax, [esp + 0x34]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0x920]
call sub.KERNEL32.dll_GetOverlappedResult
test al, al
je 0x41fd77
cmp dword [edi], 0
je 0x41fd8d
mov ecx, dword [ebp + 0x18]
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x41fdbb
mov al, byte [esp + 0x1b]
jmp 0x41fc30
call sub.KERNEL32.dll_GetLastError
mov dword [ebx + 0xc], eax
jmp 0x41fdbb
push ebx
push 0x20
push 0xfffffffffffffffd
call sym.test_embusb.exe__sys_stat_set_12
jmp 0x41fdbb
mov esi, dword [ebp + 0x18]
push ebx
cmp dword [esi], 0
jne 0x41fda1
push 1
push 0xfffffffffffffffd
call sym.test_embusb.exe__sys_stat_set_12
jmp 0x41fdbb
push 0xa
push 0xfffffffffffffffd
call sym.test_embusb.exe__sys_stat_set_12
push ebx
push dword [ebp + 0xc]
call sym.test_embusb.exe__sys_stat_parm_int_8
push ebx
push dword [esi]
call sym.test_embusb.exe__sys_stat_parm_int_8
cmp byte [esp + 0x1b], 0
je 0x41fdcb
push dword [esp + 0x3c]
call fcn.00405e0a
mov eax, dword [ebx + 0xc]
cmp eax, 0x208
je 0x41fdda
cmp eax, 0x40
jne 0x41fde4
push ebx
push 1
push 0xfffffffffffffffd
call sym.test_embusb.exe__sys_stat_set_12
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18