Function at 0x40b4c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4434a0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x44e040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x44e638]
mov dword [ebp - 0x24], ebx
cmp dword [ebx + 0x80], 0
je 0x40b504
mov ecx, str.Forgot_to_shutdown_Platform_backend_
call fcn.00419360
cmp dword [ebx + 0x84], 0
je 0x40b517
mov ecx, str.Forgot_to_shutdown_Renderer_backend_
call fcn.00419360
mov eax, dword [ebx + 0x2c]
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [ebp - 0x10], 6
test eax, eax
je 0x40b695
cmp byte [ebx + 1], 0
je 0x40b695
mov byte [eax + 0x18], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x40b695
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0042ddf0
mov ecx, esi
call fcn.0042dff0
add esi, 0x44
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x40b60f
xor ecx, ecx
mov ebx, esi
mov dword [ebp - 0x1c], ecx
nop word [eax + eax]
mov eax, dword [ebx + 8]
mov esi, dword [ecx + eax]
test esi, esi
je 0x40b5f7
mov ecx, esi
call fcn.00430870
mov ecx, dword [0x44e638]
test ecx, ecx
je 0x40b5eb
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40b5e1
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
call edi
mov ecx, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x18]
inc edx
add ecx, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], ecx
cmp edx, dword [ebx]
jl 0x40b580
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.004061d0
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x5c]
mov byte [eax + 0x20], 0
call fcn.00421190
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x50]
call fcn.00421190
mov ecx, esi
call fcn.00421190
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x44e638]
test ecx, ecx
je 0x40b68d
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov esi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x40b683
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], esi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push dword [ebp - 0x14]
call edi
add esp, 4
lea ecx, [ebx + 0x3d9c]
mov dword [ebx + 0x2c], 0
call fcn.004061d0
cmp byte [ebx], 0
je 0x40bf65
cmp byte [ebx + 0x50e0], 0
je 0x40b70c
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x40b70c
mov eax, dword [0x44e638]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x50e4], 0
call fcn.00420060
mov edx, 0x44a4ec
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00407990
mov esi, eax
test esi, esi
je 0x40b70c
push esi
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x28]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
mov eax, dword [ebx + 0x5118]
mov esi, dword [ebx + 0x5120]
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
mov dword [ebp - 0x28], eax
cmp esi, eax
je 0x40b73f
cmp dword [esi + 4], 6
jne 0x40b738
mov eax, dword [esi + 0xc]
push esi
push ebx
call eax
mov eax, dword [ebp - 0x28]
add esp, 8
add esi, 0x14
cmp esi, eax
jne 0x40b725
lea ecx, [ebx + 0x3fc0]
xor edx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], edx
cmp dword [ecx], edx
jle 0x40b7ef
mov ebx, dword [ebp - 0x18]
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
nop dword [eax]
mov eax, dword [ebx + 8]
mov esi, dword [ecx + eax]
test esi, esi
je 0x40b7d7
mov ecx, esi
call fcn.0040c780
mov ecx, dword [0x44e638]
test ecx, ecx
je 0x40b7cb
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40b7c1
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
call edi
mov ecx, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x20]
inc edx
add ecx, 4
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
cmp edx, dword [ebx]
jl 0x40b760
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
call fcn.004061d0
lea ecx, [ebx + 0x3fcc]
call fcn.004061d0
lea ecx, [ebx + 0x3fd8]
call fcn.004061d0
mov dword [ebx + 0x400c], 0
mov esi, dword [ebx + 0x3fec]
test esi, esi
je 0x40b89c
mov ecx, dword [0x44e638]
mov dword [ebx + 0x3fe8], 0
mov dword [ebx + 0x3fe4], 0
test ecx, ecx
je 0x40b88c
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40b882
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
call edi
add esp, 4
mov dword [ebx + 0x3fec], 0
lea ecx, [ebx + 0x3ff0]
call fcn.004061d0
or eax, 0xffffffff
mov dword [ebx + 0x4ae8], 0
mov dword [ebx + 0x4014], 0
lea edi, [ebx + 0x480c]
mov dword [ebx + 0x4010], 0
mov ecx, 0x4d
mov dword [ebx + 0x4098], 0
mov dword [ebx + 0x4088], 0
mov dword [ebx + 0x401c], 0
rep stosd dword es:[edi], eax
lea ecx, [ebx + 0x4940]
call fcn.004061d0
lea ecx, [ebx + 0x494c]
call fcn.004061d0
mov esi, dword [ebx + 0x4a70]
test esi, esi
je 0x40b98e
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4a6c], 0
mov dword [ebx + 0x4a68], 0
test ecx, ecx
je 0x40b976
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40b96c
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
mov dword [ebx + 0x4a70], 0
jmp 0x40b994
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x4a7c]
test edi, edi
je 0x40ba1c
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4a78], 0
mov dword [ebx + 0x4a74], 0
test ecx, ecx
je 0x40ba0c
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40ba02
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4a7c], 0
lea ecx, [ebx + 0x4a80]
call fcn.004061d0
lea ecx, [ebx + 0x4ab0]
call fcn.004061d0
lea ecx, [ebx + 0x4abc]
call fcn.004061d0
mov edi, dword [ebx + 0x4ad0]
test edi, edi
je 0x40bac5
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4acc], 0
mov dword [ebx + 0x4ac8], 0
test ecx, ecx
je 0x40bab5
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40baab
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4ad0], 0
xor edi, edi
lea eax, [ebx + 0x4adc]
mov dword [ebp - 0x24], eax
cmp dword [ebx + 0x4ad4], edi
jle 0x40bb04
xor esi, esi
nop word [eax + eax]
mov ecx, dword [eax]
mov ecx, dword [ecx + esi]
call fcn.00422700
inc edi
lea esi, [esi + 4]
lea eax, [ebx + 0x4adc]
cmp edi, dword [ebx + 0x4ad4]
jl 0x40bae0
lea eax, [ebx + 0x4adc]
jmp 0x40bb07
mov dword [ebp - 0x24], eax
mov esi, dword [eax]
test esi, esi
je 0x40bb87
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4ad8], 0
mov dword [ebx + 0x4ad4], 0
test ecx, ecx
je 0x40bb70
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40bb66
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
mov eax, dword [ebp - 0x24]
add esp, 4
mov dword [eax], 0
jmp 0x40bb8d
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4de8]
call fcn.004213e0
mov edi, dword [ebx + 0x4e10]
test edi, edi
je 0x40bc20
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4e0c], 0
mov dword [ebx + 0x4e08], 0
test ecx, ecx
je 0x40bc10
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40bc06
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4e10], 0
mov edi, dword [ebx + 0x4e1c]
test edi, edi
je 0x40bca8
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4e18], 0
mov dword [ebx + 0x4e14], 0
test ecx, ecx
je 0x40bc98
movsx eax, word [ecx + 0x524c]
mov edx, dword [ecx + 0x3f78]
add eax, 0xa4a
mov dword [ebp - 0x28], edx
cmp dword [ecx + eax*8], edx
lea eax, [ecx + eax*8]
je 0x40bc8e
movsx eax, word [ecx + 0x524c]
inc eax
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov edx, dword [ebp - 0x28]
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
lea eax, [ecx + eax*8]
mov dword [eax], edx
xor edx, edx
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push edi
call esi
add esp, 4
mov dword [ebx + 0x4e1c], 0
xor esi, esi
cmp dword [ebx + 0x4d88], esi
jle 0x40bcd9
xor edi, edi
nop dword [eax]
nop dword [eax + eax]
mov ecx, dword [ebx + 0x4d90]
add ecx, edi
call fcn.004067d0
inc esi
add edi, 0x1c
cmp esi, dword [ebx + 0x4d88]
jl 0x40bcc0
mov esi, dword [ebx + 0x4d90]
test esi, esi
je 0x40bd5a
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4d8c], 0
mov dword [ebx + 0x4d88], 0
test ecx, ecx
je 0x40bd46
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40bd3c
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [ebx + 0x4d90], 0
lea ecx, [ebx + 0x4dac]
call fcn.00421520
xor edi, edi
cmp dword [ebx + 0x4da0], edi
jle 0x40bd8a
xor esi, esi
mov ecx, dword [ebx + 0x4da8]
add ecx, esi
call fcn.004220d0
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4da0]
jl 0x40bd71
mov esi, dword [ebx + 0x4da8]
test esi, esi
je 0x40be0f
mov ecx, dword [0x44e638]
mov dword [ebx + 0x4da4], 0
mov dword [ebx + 0x4da0], 0
test ecx, ecx
je 0x40bdf7
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40bded
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
push esi
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
call esi
add esp, 4
mov dword [ebx + 0x4da8], 0
jmp 0x40be15
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4dd8]
call fcn.004061d0
lea ecx, [ebx + 0x4e94]
call fcn.00421230
lea ecx, [ebx + 0x4e88]
call fcn.00421330
lea ecx, [ebx + 0x5048]
call fcn.004061d0
lea ecx, [ebx + 0x5054]
call fcn.004061d0
lea ecx, [ebx + 0x4eec]
call fcn.004061d0
lea ecx, [ebx + 0x4ef8]
call fcn.004061d0
lea ecx, [ebx + 0x4f38]
mov dword [ebx + 0x4f34], 0
call fcn.004061d0
lea ecx, [ebx + 0x5100]
call fcn.004061d0
mov eax, dword [ebx + 0x50fc]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x40bf05
mov ecx, dword [0x44e638]
mov dword [ebx + 0x50f8], 0
mov dword [ebx + 0x50f4], 0
test ecx, ecx
je 0x40bef5
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40bee8
lea eax, [edx + 1]
cdq
idiv dword [ebp - 0x10]
movzx eax, dx
mov word [ecx + 0x524c], ax
cwde
add eax, 0xa4a
xor edx, edx
lea eax, [ecx + eax*8]
mov dword [eax], edi
mov dword [eax + 4], edx
inc word [eax + 6]
inc dword [ecx + 0x5248]
mov eax, dword [ebp - 0x28]
push eax
call esi
add esp, 4
mov dword [ebx + 0x50fc], 0
cmp dword [ebx + 0x5158], 0
je 0x40bf37
mov esi, dword [ebx + 0x5158]
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
cmp esi, eax
je 0x40bf2d
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
mov dword [ebx + 0x5158], 0
lea ecx, [ebx + 0x515c]
call fcn.004061d0
lea ecx, [ebx + 0x51c0]
call fcn.004061d0
lea ecx, [ebx + 0x51cc]
call fcn.004061d0
mov dword [ebx + 0x51d8], 0
mov byte [ebx], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret