Function at 0x408176
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
push 0x14
call fcn.004422bd
add esp, 4
mov dword [ebp - 0x10], eax
mov ebx, eax
mov edi, eax
xor eax, eax
mov ecx, 5
rep stosd dword es:[edi], eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
cmp dword [0x4e9bf4], 0xffffffff
jne 0x4081d6
mov eax, 0
jmp 0x408526
push VariantClear
push 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
jne 0x4081eb
mov eax, 0x4c7769
push eax
push 1
mov ebx, 0x194
call fcn.00444480
add esp, 0x10
mov dword [ebp - 4], eax
push 0x80000301
push 0
push 0x41
push 1
mov ebx, 0x1bc
call fcn.00443a80
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x408236
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov dword [ebp - 8], eax
mov ebx, dword [ebp - 8]
call fcn.00401bde
mov eax, 1
cmp eax, ecx
jl 0x408262
push 0xb8
push 0x4030dcc
push 1
call fcn.004422c3
add esp, 0xc
add ebx, eax
mov dword [ebp - 0x1c], ebx
push 0x80000301
push 0
push dword [ebp - 4]
push 1
mov ebx, 0x9d4
call fcn.00444830
add esp, 0x10
mov ebx, dword [ebp - 0x1c]
mov byte [ebx], al
push VariantClear
push 0
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
jne 0x40829d
mov eax, 0x4c7769
push eax
push 0x80000301
push 0
push dword [ebp - 4]
push 0x80000301
push 0
push 3
push VariantClear
push 0
mov eax, dword [ebp - 8]
test eax, eax
jne 0x4082c7
mov eax, 0x4c7769
push eax
push 4
mov ebx, 0x1b4
call fcn.004448e0
add esp, 0x34
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x4082f1
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov dword [ebp - 8], eax
push 0x80000301
push 0
push dword [0x4e9bf4]
push 1
mov ebx, 0x168
call fcn.00443bd0
add esp, 0x10
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x1c]
push str.HID_SendData_
mov ecx, 2
call fcn.00402cde
add esp, 8
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40833f
push ebx
call fcn.004422cf
add esp, 4
mov dword [ebp - 0x24], esp
push dword [ebp - 0x20]
push 1
push 1
push 0
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
nop
nop
cmp dword [ebp - 0x24], esp
je 0x40837a
push 0x19c
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x40838d
push ebx
call fcn.004422cf
add esp, 4
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xc], eax
mov ebx, dword [ebp - 0x10]
add ebx, 0x10
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], eax
mov ebx, dword [ebp - 0x10]
add ebx, 8
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], 0
mov ebx, dword [ebp - 0x10]
add ebx, 0xc
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x1c]
mov dword [ebx], 0
mov dword [ebp - 0x1c], esp
push dword [ebp - 0xc]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4083f4
push 0x23b
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x1c], esp
push dword [ebp - 0x10]
mov eax, 0x41
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0x41
mov eax, dword [ebp - 8]
test eax, eax
je 0x408415
add eax, 8
push eax
push dword [0x4e9bf4]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x408442
push 0x26e
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
and eax, 1
xor eax, 1
test eax, eax
je 0x4084f2
mov dword [ebp - 0x1c], esp
push 0xa
push dword [ebp - 0xc]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x408487
push 0x2ef
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 1
cmp dword [ebp - 0x18], 0x80
je 0x4084af
cmp dword [ebp - 0x18], 0x102
je 0x4084af
xor eax, eax
jmp 0x4084b4
mov eax, 1
test eax, eax
je 0x4084f2
mov dword [ebp - 0x1c], esp
push dword [0x4e9bf4]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CancelIo]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x4084eb
push 0x39c
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], esp
push dword [ebp - 0xc]
xor eax, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
nop
cmp dword [ebp - 0x1c], esp
je 0x40851e
push 0x3ea
push 0x4030dcc
push 6
call fcn.004422c3
add esp, 0xc
mov eax, dword [ebp - 0x14]
jmp 0x408526
push eax
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x408537
push ebx
call fcn.004422cf
add esp, 4
mov ebx, dword [ebp - 0x10]
push ebx
call fcn.004422cf
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4