Function at 0x410420
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov eax, dword [eax + 0x68]
test eax, eax
jne 0x4106e4
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x34]
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x54], ecx
test ecx, ecx
je 0x4104fc
mov edx, dword [ebp + 8]
xor eax, eax
add edx, 0x2c
mov dword [ebp - 0x64], edx
push edx
push edx
push eax
mov eax, dword [ebp - 0x64]
push eax
call fcn.00444500
add esp, 0x10
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x38], ecx
test ecx, ecx
je 0x4104ec
add eax, 4
xor edi, edi
mov dword [ebp - 0x5c], eax
jmp 0x410489
mov dword [ebx + 4], eax
inc edi
cmp edi, dword [ebp - 0x38]
je 0x4104ec
push eax
push eax
push edi
mov eax, dword [ebp - 0x5c]
push eax
call fcn.00444500
add esp, 0xc
mov ebx, eax
push 1
push eax
mov esi, dword [ebp + 8]
push esi
call fcn.00410010
add esp, 0x10
mov esi, eax
test eax, eax
jns 0x410480
push ecx
push ecx
push ebx
lea ebx, [ebp - 0x14]
push ebx
call fcn.004332f0
add esp, 0xc
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [ebp - 0x14]
add eax, 0x40
push edx
push str.Error_adding_span_for_style_tag__s_n
push eax
call sub.msvcrt.dll_fprintf
mov dword [esp], ebx
mov ebx, esi
call fcn.00432bc0
add esp, 0x10
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x54], eax
ja 0x41045c
mov eax, dword [ebp + 8]
push eax
call fcn.0040f860
push edi
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0x54]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x50]
add eax, esi
lea eax, [eax*4 + 0x1c]
mov dword [ebp - 0x48], eax
push eax
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx]
push ebx
call fcn.004025f0
add esp, 0x10
test eax, eax
je 0x410b08
mov ecx, dword [ebp + 8]
cmp byte [ecx + 1], 1
sbb eax, eax
mov ecx, dword [ebp - 0x4c]
xor eax, 0xffffffff
mov dword [ebp - 0x10], 0
add eax, 2
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x4107e7
lea ecx, [eax*8 - 1]
mov eax, 1
shl eax, cl
dec eax
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x28], eax
add edx, edx
add ecx, 4
xor eax, eax
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x60], ecx
jmp 0x410602
mov ecx, edx
cmp ebx, 0x7f
jbe 0x4105a4
mov eax, ebx
lea ecx, [edx + 1]
shr eax, 8
and eax, 0x7f
or eax, 0xffffff80
mov byte [edx], al
mov byte [ecx], bl
lea edx, [ecx + 1]
cmp esi, 0x7f
jbe 0x4105bf
mov eax, esi
lea edx, [ecx + 2]
shr eax, 8
and eax, 0x7f
or eax, 0xffffff80
mov byte [ecx + 1], al
mov ecx, esi
mov byte [edx], cl
push eax
lea eax, [esi + 1]
push eax
lea eax, [edx + 1]
mov edi, dword [ebp - 0x18]
push edi
push eax
call sub.msvcrt.dll_strncpy
add esp, 0x10
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x40]
add edx, eax
sub esp, 0xc
mov dword [ebp - 0x40], edx
lea edx, [ebp - 0x18]
push edx
call fcn.00432bc0
mov eax, dword [ebp - 0x10]
add esp, 0x10
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x4c], eax
jbe 0x410798
push edx
push edx
push eax
mov eax, dword [ebp - 0x60]
push eax
call fcn.00444500
mov edi, eax
add esp, 0x10
mov eax, dword [eax]
mov eax, dword [eax - 0xc]
shr eax, 1
lea ebx, [eax - 1]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x28], ebx
jb 0x41062e
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x34], edx
sub esp, 0xc
lea ecx, [ebp - 0x18]
push ecx
call fcn.00432f90
mov eax, dword [ebp + 8]
add esp, 0x10
cmp byte [eax + 1], 0
jne 0x41071b
xor eax, eax
xor esi, esi
mov edx, dword [ebp - 0x40]
mov dword [edi + 4], edx
lea edx, [esi + 1]
mov ecx, dword [ebp + 8]
cmp byte [ecx + 1], 0
jne 0x410663
lea edx, [ebx + 1]
mov ecx, dword [ebp - 0x34]
add eax, ecx
mov ecx, dword [ebp - 0x44]
imul edx, ecx
add eax, edx
mov dword [ebp - 0x30], eax
push eax
push eax
mov ecx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x30]
add eax, ecx
add eax, edx
push eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call fcn.004025f0
add esp, 0x10
test eax, eax
je 0x410a24
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x40]
add eax, edx
lea edx, [eax + ecx]
mov eax, dword [ebp + 8]
cmp byte [eax + 1], 0
jne 0x41058d
cmp ebx, 0x7fff
jbe 0x4106ce
mov eax, ebx
shr eax, 0x10
and eax, 0x7fff
or eax, 0xffff8000
mov word [edx], ax
add edx, 2
mov word [edx], bx
lea eax, [edx + 2]
mov esi, dword [edi]
push esi
push eax
call fcn.0040f830
pop ecx
pop ebx
jmp 0x4105d8
push eax
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push eax
push ecx
call fcn.00410050
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov ebx, 0x80000000
test eax, eax
jne 0x41076c
sub esp, 0xc
lea edx, [ebp - 0x18]
push edx
call fcn.004923f0
mov eax, ebx
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [ebp - 0x1c]
push eax
push eax
push edi
push edx
call fcn.004332f0
lea ecx, [ebp - 0x1c]
pop esi
pop eax
lea eax, [ebp - 0x18]
push ecx
push eax
call fcn.00432c60
lea edx, [ebp - 0x1c]
mov dword [esp], edx
call fcn.00432bc0
mov ecx, dword [ebp + 8]
add esp, 0x10
cmp byte [ecx + 1], 0
je 0x41064a
mov eax, dword [ebp - 0x18]
mov esi, dword [eax - 0xc]
mov eax, dword [ebp - 0x44]
dec esi
cmp dword [ebp - 0x28], esi
jae 0x41064e
mov eax, dword [ebp - 0x20]
jmp 0x41064e
push edi
mov esi, dword [eax + 0x68]
push esi
mov ebx, dword [eax + 0x64]
push ebx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
call fcn.00402640
add esp, 0x10
mov ebx, eax
test eax, eax
setle al
and eax, 0xff
neg eax
and ebx, eax
jmp 0x410702
test byte [ebp - 0x40], 3
je 0x4107e7
mov ebx, dword [ebp - 0x40]
push eax
add ebx, 3
push eax
mov ecx, dword [ebp - 0x48]
and ebx, 0xfffffffc
lea eax, [ebx + ecx]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
push eax
call fcn.004025f0
add esp, 0x10
test eax, eax
je 0x410b2c
mov esi, dword [ebp - 0x48]
mov edi, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x40]
mov edx, ebx
add eax, esi
sub edx, edi
add eax, ecx
push edi
push edx
push 0
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x40], ebx
add esp, 0x10
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x10], 0
test esi, esi
je 0x410902
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x40]
add ecx, 0x2c
mov dword [ebp - 0x3c], edx
xor eax, eax
mov dword [ebp - 0x64], ecx
push ebx
push ebx
push eax
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00444500
mov esi, eax
mov edx, dword [ebp - 0x40]
mov edi, dword [eax + 0xc]
lea eax, [edi + edi*2]
shl eax, 2
mov dword [ebp - 0x58], eax
add eax, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x3c]
sub eax, edx
mov dword [esi], eax
mov ecx, dword [ebp - 0x2c]
pop ebx
pop eax
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x3c]
add eax, ecx
add eax, edx
push eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
push ebx
call fcn.004025f0
add esp, 0x10
test eax, eax
je 0x410a53
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x3c]
add eax, ecx
add eax, edx
test edi, edi
je 0x4108a7
add eax, 0xc
xor ebx, ebx
mov dword [ebp - 0x24], eax
mov ecx, eax
mov edx, ebx
mov eax, dword [esi + 8]
shl edx, 4
inc ebx
mov eax, dword [edx + eax + 4]
mov dword [ecx - 0xc], eax
mov eax, dword [esi + 8]
mov eax, dword [edx + eax + 8]
mov dword [ecx - 8], eax
mov eax, dword [esi + 8]
mov eax, dword [edx + eax + 0xc]
mov dword [ecx - 4], eax
add ecx, 0xc
cmp ebx, edi
jne 0x410872
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x58]
lea eax, [edx + ecx - 0xc]
mov dword [eax], 0xffffffff
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x3c]
add edi, eax
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x54], eax
ja 0x41080a
push esi
push esi
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x48]
lea eax, [edx + ecx + 8]
push eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax]
push ebx
call fcn.004025f0
add esp, 0x10
test eax, eax
je 0x410a53
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x3c]
add eax, ecx
add eax, edx
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
push edi
push edi
push 4
mov edx, dword [ebp + 0xc]
mov esi, dword [edx]
push esi
call fcn.00402690
add esp, 0x10
mov edx, eax
test eax, eax
je 0x410b08
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
mov word [eax], 1
mov word [eax + 2], 0x1c
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
mov eax, dword [eax + 0x68]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x50]
mov dword [edx + 8], eax
mov ecx, dword [ebp - 0x54]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x41097f
mov dword [edx + 0x10], 1
mov ecx, dword [ebp + 8]
cmp byte [ecx + 1], 0
je 0x410991
mov ebx, dword [edx + 0x10]
or bh, 1
mov dword [edx + 0x10], ebx
mov eax, dword [ebp - 0x48]
mov dword [edx + 0x14], eax
xor eax, eax
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x4109a8
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x48]
add eax, edi
mov dword [edx + 0x18], eax
lea edi, [edx + 0x1c]
mov edx, dword [ebp + 8]
cmp byte [edx], 0
je 0x410aab
mov esi, dword [ebp - 0x50]
mov dword [ebp - 0x10], 0
test esi, esi
je 0x410a03
xor eax, eax
push eax
mov ebx, dword [ebp + 8]
push ebx
call fcn.0040f880
mov esi, eax
push ecx
lea ebx, [eax + 8]
push ebx
call fcn.00444730
pop eax
lea ecx, [ebp - 0x10]
pop edx
push ecx
push ebx
call fcn.00444a20
mov eax, dword [esi + 4]
mov dword [edi], eax
add esp, 0x10
mov eax, dword [ebp - 0x10]
add edi, 4
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x50], eax
ja 0x4109ca
mov eax, dword [ebp + 8]
cmp byte [eax], 0
je 0x410a77
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x10], 0
test esi, esi
jne 0x410af9
xor ebx, ebx
jmp 0x4104e2
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 0xfffffff4
add eax, 0x40
push eax
push 0x25
push 1
push str.ERROR:_Out_of_memory_for_string_pool_n
call sub.msvcrt.dll_fwrite
lea edx, [ebp - 0x18]
mov dword [esp], edx
call fcn.00432bc0
add esp, 0x10
jmp 0x4104e2
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 0xfffffff4
add eax, 0x40
push eax
push 0x27
push 1
push str.ERROR:_Out_of_memory_for_string_styles_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x4104e2
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x10], 0
test ecx, ecx
je 0x410a1d
xor edx, edx
mov ecx, dword [ebp + 8]
lea edx, [edx + edx*2]
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + edx*8]
mov dword [edi], eax
add edi, 4
mov edx, dword [ebp - 0x10]
inc edx
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x54], edx
ja 0x410a87
xor ebx, ebx
jmp 0x4104e2
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x10], 0
test eax, eax
je 0x410a03
mov eax, dword [ebp + 8]
xor edx, edx
add eax, 4
mov dword [ebp - 0x60], eax
push eax
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x1c]
mov eax, dword [eax + edx*4]
push eax
mov eax, dword [ebp - 0x60]
push eax
call fcn.00444500
add esp, 0x10
mov eax, dword [eax + 4]
mov dword [edi], eax
add edi, 4
mov edx, dword [ebp - 0x10]
inc edx
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x50], edx
ja 0x410ac8
jmp 0x410a03
push ebx
push str.Shouldnt_be_here_
push 0
push 0
call fcn.0044c290
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 0xfffffff4
add eax, 0x40
push eax
push 0x25
push 1
push str.ERROR:_Out_of_memory_for_string_pool_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x4104e2
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 0xfffffff4
add eax, 0x40
push eax
push 0x29
push 1
push str.ERROR:_Out_of_memory_padding_string_pool_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x4104e2