Function at 0x41d001
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x444600]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
or dword [ebx + 0x48], 0xffffffff
push esi
push edi
mov dword [ebp - 0x29c], eax
mov esi, edx
xor edx, edx
mov dword [ebx + 4], 3
mov dword [ebx + 0x34], esi
mov dword [ebx + 0x2c], 0x41241f
mov dword [ebx + 0x38], edx
mov dword [ebx + 0x44], edx
xor eax, eax
lea edi, [ebx + 0x10]
mov dword [edi], edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x2a0], ecx
cmp dword [esi + 0x74], edx
je 0x41d1b0
mov eax, dword [ecx]
xor edi, edi
inc edi
cmp dword [esi + 0x88], 3
mov dword [ebp - 0x294], edi
mov dword [ebp - 0x28c], eax
mov dword [ebp - 0x288], edx
je 0x41d087
lea eax, [esi + 0x84]
mov dword [ebp - 0x298], eax
jmp 0x41d0ad
push 0x4c
call fcn.00423a63
pop ecx
mov dword [ebp - 0x298], eax
test eax, eax
jne 0x41d0ad
push str.malloc
push 0xe
call fcn.0041fca8
mov eax, dword [ebp - 0x298]
pop ecx
pop ecx
lea ecx, [eax + 0x10]
mov dword [eax + 0x38], edi
mov dword [eax + 4], 3
mov dword [eax + 0x34], esi
xor edx, edx
mov dword [eax + 0x2c], edx
xor eax, eax
mov dword [ecx], edx
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [ebp - 0x294]
and al, 2
movsx eax, al
neg eax
sbb eax, eax
push ecx
mov edi, 0x278
and eax, edi
push edx
add eax, 0x10
push eax
lea eax, [ebp - 0x294]
push eax
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41d12d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x41d139
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, esi
call fcn.0041fd2f
mov ecx, dword [ebp - 0x29c]
mov dword [ecx + 4], eax
mov dword [ecx + 8], esi
or eax, 0xffffffff
jmp 0x41d2d8
mov edi, dword [ebp - 0x298]
and dword [edi + 0x24], 0
jmp 0x41d15b
mov eax, dword [ebp - 0x294]
mov ecx, dword [ebp - 0x298]
and al, 2
movsx eax, al
neg eax
sbb eax, eax
and eax, edi
add eax, 0x10
mov dword [ecx + 0x24], eax
add dword [esi + 0x20], eax
mov edi, ecx
mov eax, dword [esi + 0x34]
lea ecx, [eax + 1]
mov dword [esi + 0x34], ecx
test eax, eax
jne 0x41d17f
mov eax, dword [esi + 0x1c]
test al, 0x40
jne 0x41d17f
or eax, 0x40
mov dword [esi + 0x1c], eax
test al, 0x20
je 0x41d17f
mov eax, dword [esi + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp - 0x29c]
add eax, 0x18
mov edx, dword [eax]
lea ecx, [edi + 8]
mov dword [ecx], edx
mov dword [edx + 4], ecx
mov dword [edi + 0xc], eax
mov dword [eax], ecx
inc dword [esi + 0x30]
inc dword [esi + 0x6c]
test byte [ebp - 0x294], 1
je 0x41d2d6
mov ecx, dword [ebp - 0x2a0]
test dword [esi + 0x1c], 0x1000000
je 0x41d20c
mov eax, dword [ecx]
mov dword [ebx + 0x3c], eax
mov eax, dword [ecx + 4]
and dword [ebx + 0x28], 0
mov dword [ebx + 0x40], eax
mov eax, dword [esi + 0xec]
test eax, eax
je 0x41d1e3
mov eax, dword [eax + 0x28]
mov dword [ebx + 0x28], eax
mov eax, dword [esi + 0xec]
mov dword [eax + 0x28], ebx
jmp 0x41d1e6
mov dword [ebx + 0x28], ebx
cmp dword [esi + 0x6c], 0
mov dword [esi + 0xec], ebx
jne 0x41d1ff
mov ecx, esi
call fcn.0041cfb5
mov ecx, dword [ebp - 0x2a0]
mov ecx, dword [ecx]
mov dword [ebx + 0x24], ecx
add dword [esi + 0x20], ecx
jmp 0x41d294
lea eax, [ebx + 0x10]
push eax
push 0
push dword [ecx]
push dword [ecx + 4]
push dword [esi + 0x78]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41d23a
call edi
cmp eax, 0x3e5
je 0x41d240
call edi
jmp 0x41d110
and dword [ebx + 0x24], 0
jmp 0x41d24e
mov eax, dword [ebp - 0x2a0]
mov eax, dword [eax]
mov dword [ebx + 0x24], eax
add dword [esi + 0x20], eax
test dword [esi + 0x1c], 0x100000
je 0x41d294
xor eax, eax
push eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x44], eax
test eax, eax
jne 0x41d279
push str.CreateEvent
call edi
push eax
call fcn.0041fca8
pop ecx
pop ecx
push 4
push 0xffffffffffffffff
push ebx
push 0x41b486
push dword [ebx + 0x20]
lea eax, [ebx + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
je 0x41d233
mov eax, dword [esi + 0x34]
lea ecx, [eax + 1]
mov dword [esi + 0x34], ecx
test eax, eax
jne 0x41d2b8
mov eax, dword [esi + 0x1c]
test al, 0x40
jne 0x41d2b8
or eax, 0x40
mov dword [esi + 0x1c], eax
test al, 0x20
je 0x41d2b8
mov eax, dword [esi + 8]
inc dword [eax + 0xc]
mov eax, dword [ebp - 0x29c]
add eax, 0x18
mov edx, dword [eax]
lea ecx, [ebx + 8]
mov dword [ecx], edx
mov dword [edx + 4], ecx
mov dword [ebx + 0xc], eax
mov dword [eax], ecx
inc dword [esi + 0x30]
inc dword [esi + 0x6c]
xor eax, eax
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.00423324
leave
ret