Function at 0x41ca7c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 4], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], esi
mov ebx, ecx
mov esi, edx
mov edi, eax
test edi, edi
je 0x41cf83
mov ecx, dword [edi + 0xdc]
movzx eax, byte [edi + 0x168]
movzx edx, byte [edi + 0x169]
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x138]
and eax, 0x80
shr eax, 7
mov dword [ebp - 0x1c], eax
and edx, 1
xor eax, eax
mov dword [ebp - 0x24], edx
mov dword [edi + 0xc8], eax
mov dword [edi + 0xcc], eax
mov dword [edi + 0xe8], eax
test ebx, ebx
jne 0x41cb87
test edi, edi
je 0x41ce74
test byte [edi + 0x165], 4
jne 0x41cb0c
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 1
jmp 0x41ce65
lea eax, [ebp - 0x14]
push 0
push eax
mov edx, dword [edi + 0x38]
mov ebx, dword [edi + 0x40]
sub ebx, edx
push ebx
push edx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
mov eax, dword [edi + 0x38]
mov edx, dword [edi + 0xf0]
and byte [edi + 0x165], 0xfb
xor ecx, ecx
test esi, esi
mov dword [edi + 0x40], ecx
mov dword [edi + 0x3c], eax
mov dword [edi + 0xa8], ecx
mov dword [edi + 0xac], ecx
jne 0x41cb54
mov esi, 0xffffffff
add edx, eax
mov dword [edi + 0x44], edx
mov eax, ebx
cdq
mov eax, dword [edi + 0xc0]
add ebx, eax
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], ebx
mov dword [edi + 0xb8], ebx
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
jmp 0x41ce65
test edi, edi
je 0x41cc03
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x41cc03
cmp esi, dword [ebp - 0x2c]
je 0x41cc03
mov edx, eax
mov eax, dword [edi + 0x38]
sub edx, eax
mov dword [ebp - 0x2c], edx
je 0x41cc03
lea edx, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push edx
push dword [ebp - 0x2c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x41cbdb
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 0xffffffff
jmp 0x41ce65
mov eax, dword [ebp - 0x2c]
cdq
add eax, dword [edi + 0xc0]
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], eax
mov dword [edi + 0xb8], eax
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
cmp dword [0x4edea0], 0
je 0x41ccb7
test ecx, ecx
jne 0x41cc1e
mov esi, 0xffffffff
jmp 0x41cc9c
cmp dword [ebp - 0x1c], 0
je 0x41cc2d
cmp ecx, 0xfffffffa
je 0x41cf1f
cmp ecx, 2
je 0x41cc37
cmp ecx, 1
jne 0x41cc57
mov dword [ebp - 0x20], ecx
call fcn.004b0b90
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
cmp dword [0x4edea0], 0
je 0x41cc82
mov dword [ebp - 0x28], 1
jmp 0x41cc5f
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 0
je 0x41cc7c
cmp dword [ebp - 0x24], 0
je 0x41cc7c
push dword [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
call fcn.004b0900
mov ecx, dword [ebp - 0x20]
add esp, 4
cmp dword [ebp - 0x28], 0
je 0x41ccb7
push 0
push dword [ebp - 0x2c]
push ebx
push esi
call fcn.004b0960
add esp, 0x10
mov esi, eax
cmp esi, ebx
je 0x41cc9c
mov esi, 0xffffffff
test edi, edi
je 0x41ce65
xor edx, edx
mov dword [edi + 0xa8], edx
mov dword [edi + 0xac], edx
jmp 0x41ce65
test edi, edi
je 0x41cd2b
test byte [edi + 0x169], 0x40
jne 0x41cccc
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x41cd14
test byte [edi + 0x167], 1
je 0x41ccdd
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x41cd14
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0x40]
cmp esi, edx
mov dword [ebp - 0x28], eax
je 0x41ccef
cmp esi, dword [ebp - 0x28]
jne 0x41cd21
mov eax, edx
add eax, dword [edi + 0xe4]
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [edi + 0xf0]
mov dword [ebp - 0x2c], ebx
lea edx, [edx + ebx*2]
cmp eax, edx
mov ebx, dword [ebp - 0x1c]
ja 0x41ce31
cmp esi, dword [ebp - 0x28]
jne 0x41cd21
add ebx, dword [ebp - 0x28]
mov esi, dword [edi + 0x38]
sub ebx, esi
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x41cd30
mov eax, 0x20000
cmp ebx, eax
jbe 0x41cd98
mov edx, ebx
test edi, edi
je 0x41cd44
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x41cd49
mov eax, 0x20000
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x1c], ebx
mov ebx, eax
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x24]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp esi, eax
je 0x41cec4
lea edx, [ebp - 0x14]
push 0
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x41ce7b
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x41cdc8
push 0xfffffffffffffff5
mov dword [ebp - 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ecx, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
je 0x41cf31
lea eax, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push eax
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
mov esi, eax
test esi, esi
jne 0x41cdda
cmp ecx, 1
je 0x41cf09
mov esi, 0xffffffff
test edi, edi
je 0x41ce65
mov edx, dword [edi + 0x38]
add edx, dword [edi + 0xf0]
xor ecx, ecx
mov dword [edi + 0x40], ecx
mov dword [edi + 0x44], edx
and byte [edi + 0x165], 0xfb
mov eax, ebx
cdq
mov eax, dword [edi + 0xc0]
add ebx, eax
adc edx, dword [edi + 0xc4]
mov dword [edi + 0xc0], ebx
mov dword [edi + 0xb8], ebx
mov dword [edi + 0xc4], edx
mov dword [edi + 0xbc], edx
mov dword [edi + 0xa8], ecx
mov dword [edi + 0xac], ecx
jmp 0x41ce65
mov ecx, dword [ebp - 0x2c]
or byte [edi + 0x165], 4
add esi, ebx
mov dword [edi + 0x40], esi
add dword [edi + 0x44], ecx
mov eax, ebx
cdq
add dword [edi + 0xb8], ebx
adc dword [edi + 0xbc], edx
xor ebx, ebx
mov dword [edi + 0xa8], ebx
mov dword [edi + 0xac], ebx
mov esi, 1
mov ebx, dword [ebp - 4]
mov edi, dword [ebp - 8]
mov eax, esi
mov esi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov esi, 1
jmp 0x41ce65
mov edx, dword [ebp - 0x14]
sub dword [ebp - 0x28], edx
add edi, edx
cmp dword [ebp - 0x18], 0
je 0x41ce96
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x134]
test ecx, ecx
jne 0x41ce9b
mov ecx, 0x20000
cmp ecx, dword [ebp - 0x28]
jb 0x41cea9
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jne 0x41ceaf
jmp 0x41ceb7
cmp dword [ebp - 0x28], 0
je 0x41ceb7
test edx, edx
ja 0x41cd63
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x41cdda
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x41cd73
push ebx
push edi
push 1
call fcn.0045af40
add esp, 0xc
mov edx, eax
cmp edx, 0xffffffff
je 0x41cef1
mov dword [ebp - 0x14], edx
mov eax, 1
jmp 0x41ce7e
lea edx, [ebp - 0x14]
push 0
push edx
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x41cd82
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x41cdd5
xor esi, esi
jmp 0x41cdda
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x2c], eax
jmp 0x41cc65
push dword [ebp - 0x10]
mov dword [ebp - 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov ecx, dword [ebp - 0x20]
cmp eax, 2
jne 0x41cdaf
push ebx
mov dword [ebp - 0x20], ecx
push esi
push 1
call fcn.0045af40
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp eax, 0xffffffff
je 0x41cf6a
mov esi, 1
jmp 0x41cdda
lea eax, [ebp - 0x14]
push 0
mov dword [ebp - 0x20], ecx
push eax
push ebx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x41cdc3
cmp dword [0x4edea0], 0
jne 0x41cfac
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x10], eax
mov eax, dword [0x4edea0]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
mov ecx, 1
jmp 0x41cadb
call fcn.004b0b90
jmp 0x41cf94