Function at 0x41cb2c
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 0x41d033
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 0x41cc37
test edi, edi
je 0x41cf24
test byte [edi + 0x165], 4
jne 0x41cbbc
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 1
jmp 0x41cf15
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 0x41cc04
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 0x41cf15
test edi, edi
je 0x41ccb3
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x41ccb3
cmp esi, dword [ebp - 0x2c]
je 0x41ccb3
mov edx, eax
mov eax, dword [edi + 0x38]
sub edx, eax
mov dword [ebp - 0x2c], edx
je 0x41ccb3
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 0x41cc8b
xor eax, eax
mov dword [edi + 0xa8], eax
mov dword [edi + 0xac], eax
mov esi, 0xffffffff
jmp 0x41cf15
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 [0x4fb140], 0
je 0x41cd67
test ecx, ecx
jne 0x41ccce
mov esi, 0xffffffff
jmp 0x41cd4c
cmp dword [ebp - 0x1c], 0
je 0x41ccdd
cmp ecx, 0xfffffffa
je 0x41cfcf
cmp ecx, 2
je 0x41cce7
cmp ecx, 1
jne 0x41cd07
mov dword [ebp - 0x20], ecx
call fcn.004b9280
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
cmp dword [0x4fb140], 0
je 0x41cd32
mov dword [ebp - 0x28], 1
jmp 0x41cd0f
xor eax, eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x1c], 0
je 0x41cd2c
cmp dword [ebp - 0x24], 0
je 0x41cd2c
push dword [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
call fcn.004b8ff0
mov ecx, dword [ebp - 0x20]
add esp, 4
cmp dword [ebp - 0x28], 0
je 0x41cd67
push 0
push dword [ebp - 0x2c]
push ebx
push esi
call fcn.004b9050
add esp, 0x10
mov esi, eax
cmp esi, ebx
je 0x41cd4c
mov esi, 0xffffffff
test edi, edi
je 0x41cf15
xor edx, edx
mov dword [edi + 0xa8], edx
mov dword [edi + 0xac], edx
jmp 0x41cf15
test edi, edi
je 0x41cddb
test byte [edi + 0x169], 0x40
jne 0x41cd7c
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x41cdc4
test byte [edi + 0x167], 1
je 0x41cd8d
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x28], eax
jmp 0x41cdc4
mov edx, dword [edi + 0x38]
mov eax, dword [edi + 0x40]
cmp esi, edx
mov dword [ebp - 0x28], eax
je 0x41cd9f
cmp esi, dword [ebp - 0x28]
jne 0x41cdd1
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 0x41cee1
cmp esi, dword [ebp - 0x28]
jne 0x41cdd1
add ebx, dword [ebp - 0x28]
mov esi, dword [edi + 0x38]
sub ebx, esi
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x41cde0
mov eax, 0x20000
cmp ebx, eax
jbe 0x41ce48
mov edx, ebx
test edi, edi
je 0x41cdf4
mov eax, dword [edi + 0x134]
test eax, eax
jne 0x41cdf9
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 0x41cf74
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 0x41cf2b
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x41ce78
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 0x41cfe1
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 0x41ce8a
cmp ecx, 1
je 0x41cfb9
mov esi, 0xffffffff
test edi, edi
je 0x41cf15
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 0x41cf15
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 0x41cf15
mov edx, dword [ebp - 0x14]
sub dword [ebp - 0x28], edx
add edi, edx
cmp dword [ebp - 0x18], 0
je 0x41cf46
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x134]
test ecx, ecx
jne 0x41cf4b
mov ecx, 0x20000
cmp ecx, dword [ebp - 0x28]
jb 0x41cf59
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jne 0x41cf5f
jmp 0x41cf67
cmp dword [ebp - 0x28], 0
je 0x41cf67
test edx, edx
ja 0x41ce13
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov esi, eax
jmp 0x41ce8a
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
jne 0x41ce23
push ebx
push edi
push 1
call fcn.00463280
add esp, 0xc
mov edx, eax
cmp edx, 0xffffffff
je 0x41cfa1
mov dword [ebp - 0x14], edx
mov eax, 1
jmp 0x41cf2e
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 0x41ce32
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
jne 0x41ce85
xor esi, esi
jmp 0x41ce8a
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x2c], eax
jmp 0x41cd15
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 0x41ce5f
push ebx
mov dword [ebp - 0x20], ecx
push esi
push 1
call fcn.00463280
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp eax, 0xffffffff
je 0x41d01a
mov esi, 1
jmp 0x41ce8a
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 0x41ce73
cmp dword [0x4fb140], 0
jne 0x41d05c
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x10], eax
mov eax, dword [0x4fb140]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
mov ecx, 1
jmp 0x41cb8b
call fcn.004b9280
jmp 0x41d044