Function at 0x41a5e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
test byte [esi + 0x120], 1
jne 0x41a8e0
mov eax, dword [esi + 0x140]
xor ebx, ebx
cmp eax, ebx
je 0x41a7ae
mov ecx, dword [esi + 0x138]
xor eax, eax
cmp dword [ecx], ebx
jne 0x41a61f
mov edx, ecx
mov edi, dword [edx + 4]
add edx, 4
inc eax
cmp edi, ebx
je 0x41a614
cmp dword [ecx + eax*4], ebx
je 0x41a657
mov dword [esi + 0x14c], eax
mov edx, dword [ecx + eax*4]
mov edx, dword [edx]
mov dword [esi + 0x148], edx
mov eax, dword [ecx + eax*4]
add eax, 4
lea ecx, [esi + 0x150]
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
lea ecx, [esi + 0x150]
mov ebx, dword [esi + 0x150]
mov edi, dword [ecx + 4]
mov edx, dword [ecx + 8]
mov eax, dword [ecx + 0xc]
test ax, ax
jbe 0x41a69c
push 0
push 0
push edx
mov edx, dword [esi + 0x10c]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 0x10c]
lea eax, [esp + 0x14]
push 0
add edi, 0x20
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 0x14c]
or edi, 0xffffffff
cmp eax, edi
jne 0x41a6c0
lea edx, [esi + 0x150]
xor cl, cl
mov eax, edx
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov ebp, dword [eax + 8]
jmp 0x41a79d
mov edx, dword [esi + 0x138]
mov eax, dword [edx + eax*4]
test eax, eax
je 0x41a6e5
mov ecx, dword [esi + 0x148]
cmp dword [eax], ecx
jne 0x41a6de
mov ebx, dword [eax + 0x14]
test ebx, ebx
jne 0x41a73f
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x41a6d3
mov ecx, dword [esi + 0x13c]
mov ebp, dword [esi + 0x14c]
inc ebp
mov eax, ebp
mov dword [esi + 0x14c], ebp
cmp eax, ecx
jge 0x41a772
mov ebx, dword [edx + eax*4]
test ebx, ebx
je 0x41a6eb
cmp eax, ecx
jge 0x41a772
mov ecx, ebx
test ecx, ecx
je 0x41a772
mov ecx, dword [ecx]
mov dword [esi + 0x148], ecx
mov eax, dword [edx + eax*4]
add eax, 4
lea edx, [esi + 0x150]
mov ecx, eax
mov edi, dword [ecx]
mov dword [edx], edi
mov edi, dword [ecx + 4]
mov dword [edx + 4], edi
mov edi, dword [ecx + 8]
mov dword [edx + 8], edi
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov cl, 1
jmp 0x41a795
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
lea ecx, [esi + 0x150]
mov dword [esi + 0x148], edx
mov eax, dword [eax + 0x14]
add eax, 4
mov edx, eax
mov edi, dword [edx]
mov dword [ecx], edi
mov edi, dword [edx + 4]
mov dword [ecx + 4], edi
mov edi, dword [edx + 8]
mov dword [ecx + 8], edi
mov edx, dword [edx + 0xc]
mov dword [ecx + 0xc], edx
mov cl, 1
jmp 0x41a795
lea eax, [esi + 0x150]
xor edx, edx
mov ecx, eax
mov dword [esi + 0x14c], edi
mov dword [esi + 0x148], edi
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
xor cl, cl
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov ebp, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov ebx, edx
test cl, cl
mov edx, ebp
jne 0x41a66c
xor ebx, ebx
mov eax, dword [esi + 0x118]
mov edi, dword [esi + 0x110]
cmp eax, ebx
mov dword [esp + 0x10], ebx
je 0x41a80d
mov edx, dword [esi + 0x10c]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push edx
call ebp
test byte [esi + 0x120], 1
jne 0x41a805
mov ecx, dword [edi + 0x1c]
mov edx, dword [esi + 0x110]
lea eax, [esp + 0x10]
push ebx
add ecx, 0x104
push eax
mov eax, dword [esi + 0x10c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41a813
mov dword [esi + 0x118], ebx
jmp 0x41a813
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 0x11c]
mov dword [esp + 0x14], ebx
mov ebx, dword [esi + 0x114]
test eax, eax
je 0x41a8e0
mov eax, dword [esi + 0x118]
mov edi, dword [esi + 0x110]
test eax, eax
mov dword [esp + 0x10], 0
je 0x41a88d
mov ecx, dword [esi + 0x10c]
push 0
push 0
push 0
push ecx
call ebp
test byte [esi + 0x120], 1
jne 0x41a883
mov eax, dword [edi + 0x1c]
mov ecx, dword [esi + 0x110]
lea edx, [esp + 0x10]
push 0
add eax, 0x104
push edx
mov edx, dword [esi + 0x10c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41a88d
mov dword [esi + 0x118], 0
mov eax, dword [esi + 0x134]
mov ecx, dword [esi + 0x10c]
push 0
push 0
push eax
push ecx
call ebp
test byte [esi + 0x120], 1
jne 0x41a8d6
mov eax, dword [ebx]
lea edx, [esp + 0x14]
push 0
push edx
mov edx, dword [esi + 0x114]
lea eax, [eax + eax*4]
lea ecx, [eax*4 + 0x10]
mov eax, dword [esi + 0x10c]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41a8e0
mov dword [esi + 0x11c], 0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret