Function at 0x4080d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 4], 0
test esi, esi
je 0x408423
mov ecx, dword [esi]
test ecx, ecx
je 0x4080fa
mov eax, dword [ecx]
mov edx, dword [eax + 4]
call edx
jmp 0x4080ff
mov eax, 0x4334c8
push 0x4348d8
mov ecx, eax
call dword [sym.imp.MSVCR100.dll_public:_bool___thiscall_type_info::operator_class_type_info_const__const]
test al, al
je 0x408423
mov eax, dword [esi]
add eax, 4
mov dword [ebp - 8], eax
je 0x408423
mov ebx, dword [ebp + 8]
call fcn.00406390
mov eax, dword [ebx + 0x10]
add eax, 8
cmp eax, dword [ebx + 0x14]
jb 0x40813d
lea esi, [ebx + 4]
call fcn.0040cac0
mov eax, dword [ebx + 0x10]
lea ecx, [eax + 8]
mov dword [ebx + 0x10], ecx
test eax, eax
je 0x408154
mov dword [eax], 0
mov byte [eax + 4], 1
mov edx, dword [ebx]
mov esi, dword [edx]
push 0x5b
call fcn.004079f0
add esp, 4
call fcn.00406390
mov eax, dword [ebx + 0x10]
add eax, 8
cmp eax, dword [ebx + 0x14]
jb 0x40817a
lea esi, [ebx + 4]
call fcn.0040cac0
mov eax, dword [ebx + 0x10]
lea ecx, [eax + 8]
mov dword [ebx + 0x10], ecx
test eax, eax
je 0x408191
mov dword [eax], 0
mov byte [eax + 4], 0
mov edx, dword [ebx]
mov esi, dword [edx]
push 0x7b
call fcn.004079f0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov edi, dword [eax]
add esp, 4
cmp edi, eax
je 0x4081fd
cmp dword [edi + 0x1c], 8
lea eax, [edi + 8]
jb 0x4081bb
mov eax, dword [eax]
mov dword [ebp + 0xc], eax
jmp 0x4081be
mov dword [ebp + 0xc], eax
cmp word [eax], 0
mov esi, eax
je 0x4081cf
add esi, 2
cmp word [esi], 0
jne 0x4081c6
call fcn.00406390
mov eax, dword [ebp + 0xc]
sub esi, eax
sar esi, 1
push esi
push eax
push ebx
call fcn.004064b0
lea ecx, [edi + 0x24]
push ecx
push ebx
call fcn.00406730
mov edi, dword [edi]
mov edx, dword [ebp - 8]
add dword [ebp - 4], eax
add esp, 8
cmp edi, dword [edx + 4]
jne 0x4081ab
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
je 0x408288
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x408236
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x408236
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0xa
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x408262
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x408262
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
movzx edx, word [ebx + 0x20]
mov ecx, dword [ebx]
shr eax, 3
imul eax, dword [ebx + 0x24]
push edx
push ecx
call fcn.00407a60
add esp, 8
mov edx, dword [ebx]
mov esi, dword [edx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x4082af
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x4082af
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x7d
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x4082db
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x4082db
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0xc]
jne 0x40830e
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40830e
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x408393
mov ecx, dword [ebx]
mov esi, dword [ecx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x408341
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x408341
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0xa
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x40836d
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x40836d
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
movzx edx, word [ebx + 0x20]
mov ecx, dword [ebx]
shr eax, 3
imul eax, dword [ebx + 0x24]
push edx
push ecx
call fcn.00407a60
add esp, 8
mov edx, dword [ebx]
mov esi, dword [edx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x4083ba
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x4083ba
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x5d
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x4083e6
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x4083e6
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0xc]
jne 0x408419
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x408419
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
mov ebx, edi
call fcn.00406390
mov ecx, dword [edi + 0x10]
lea esi, [edi + 4]
add ecx, 8
cmp ecx, dword [esi + 0x10]
jb 0x408440
call fcn.0040cac0
mov eax, dword [esi + 0xc]
lea edx, [eax + 8]
mov dword [esi + 0xc], edx
test eax, eax
je 0x408457
mov dword [eax], 0
mov byte [eax + 4], 0
mov eax, dword [edi]
mov esi, dword [eax]
push 0x7b
call fcn.004079f0
add esp, 4
call fcn.00406230
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret