Function at 0x410541
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x18]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
add eax, edx
mov dword [ebp - 0xc], eax
jmp 0x410ba7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x410629
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x410629
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1c]
mov eax, dword [ebp - 0x28]
add edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x20]
cmp edx, eax
jae 0x4105f6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
mov ecx, eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x28]
add edx, eax
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memmove
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1c]
mov eax, dword [ebp - 0x28]
add edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0x28]
add dword [ebp - 0xc], eax
jmp 0x410620
mov dword [ebp - 0x18], 0
jmp 0x410618
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x20
call sub.msvcrt.dll_putc
add dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x28]
jb 0x4105ff
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], eax
mov dword [esp + 4], 0xa
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.004113fc
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
jns 0x41066c
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
cmp dword [ebp - 0x10], 0
jne 0x4106d7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.0040ed0b
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x38]
add edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
cmp edx, eax
jae 0x4106cc
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x38]
add eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
jmp 0x410bb6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x10], eax
jmp 0x41071e
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
mov dword [esp + 8], 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.0040ed0b
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
cmp eax, dword [ebp - 0x2c]
jbe 0x41071e
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x410ba7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
sub eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
test eax, eax
jns 0x4107f5
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
cmp eax, dword [ebp - 0x10]
jbe 0x4107c0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp - 0x10]
sub edx, eax
mov eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x30]
sub eax, edx
mov edx, eax
mov eax, dword [ebp - 0xc]
add edx, eax
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memmove
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, dword [ebp - 0x30]
sub eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0xc]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x10]
sub ecx, eax
mov eax, ecx
neg eax
add edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0x30]
add eax, 1
add dword [ebp - 0xc], eax
jmp 0x410ba7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x1c]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov ecx, eax
mov eax, dword [ebp - 0x30]
sub eax, ecx
add edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edx
jmp 0x410bb6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x30]
sub eax, edx
lea edx, [eax + 1]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00410443
mov edx, eax
mov eax, dword [ebp - 0xc]
add eax, edx
mov dword [ebp - 0x1c], eax
jmp 0x41082e
sub dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
jb 0x41084a
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 0x20
je 0x41084a
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 9
jne 0x41082a
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xc]
jbe 0x410891
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
jb 0x410883
sub dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0xc]
jb 0x410883
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 0x20
je 0x410863
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 9
je 0x410863
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x10], eax
jmp 0x410930
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov edx, eax
mov eax, dword [ebp - 0x30]
sub eax, edx
lea edx, [eax + 1]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.00410443
mov edx, eax
mov eax, dword [ebp - 0xc]
add eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jae 0x4108ec
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jae 0x4108ec
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 0x20
je 0x4108ec
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 9
jne 0x4108cc
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x10]
jne 0x41090c
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0xc], eax
jmp 0x410ba7
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
add dword [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 0x20
je 0x410912
mov eax, dword [ebp - 0x1c]
movzx eax, byte [eax]
cmp al, 9
je 0x410912
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
lea edx, [eax + 1]
mov eax, dword [ebp - 0xc]
add eax, edx
cmp eax, dword [ebp - 0x20]
jne 0x41095f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x20]
mov edx, eax
mov eax, dword [ebp - 0x10]
sub edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
add eax, 1
cmp edx, eax
jl 0x41097a
jmp 0x410aa2
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x10]
add edx, 1
sub eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp edx, eax
jge 0x410aa2
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
cmp eax, dword [ebp - 0x20]
jbe 0x410aa2
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x20]
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
sub edx, eax
mov eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [esp + 8], 4
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040ed0b
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
add eax, 1
cmp edx, eax
jle 0x410a2f
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp - 0x20]
sub edx, eax
mov eax, edx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x10]
add edx, eax
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_memmove
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x10]
add eax, edx
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x34]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
lea edx, [eax + 1]
mov dword [ebp - 0x10], edx
mov byte [eax], 0xa
jmp 0x410aae
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
cmp eax, dword [ebp - 0x10]
jae 0x410a6c
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
sub ecx, eax
mov eax, ecx
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sub.msvcrt.dll_putc
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
sub edx, eax
mov eax, edx
add dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
jmp 0x410aae
mov eax, dword [ebp - 0x10]
lea edx, [eax + 1]
mov dword [ebp - 0x10], edx
mov byte [eax], 0xa
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x10]
sub edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp edx, eax
jge 0x410ae7
mov eax, dword [ebp - 0x14]
lea edx, [eax + 1]
mov eax, dword [ebp - 0xc]
add eax, edx
cmp eax, dword [ebp - 0x20]
jne 0x410b0d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x20]
mov edx, eax
mov eax, dword [ebp - 0x20]
sub edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp edx, eax
jl 0x410b0d
mov dword [ebp - 0x24], 0
jmp 0x410b00
mov eax, dword [ebp - 0x10]
lea edx, [eax + 1]
mov dword [ebp - 0x10], edx
mov byte [eax], 0x20
add dword [ebp - 0x24], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 0x24]
jg 0x410af0
jmp 0x410b3a
mov dword [ebp - 0x24], 0
jmp 0x410b2f
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], 0x20
call sub.msvcrt.dll_putc
add dword [ebp - 0x24], 1
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
cmp eax, dword [ebp - 0x24]
jg 0x410b16
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jae 0x410b69
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x20]
sub edx, eax
mov eax, edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
sub dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x410b9c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
jmp 0x410ba1
mov eax, 0xffffffff
mov edx, dword [ebp + 8]
mov dword [edx + 0x14], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
cmp eax, dword [ebp - 0xc]
ja 0x41055d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
sub edx, eax
mov eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], edx
nop
leave
ret