Function at 0x4074c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455200
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x45f040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [0x45f4d8]
mov dword [ebp - 0x24], ebx
cmp dword [ebx + 0x80], 0
je 0x407504
mov ecx, str.Forgot_to_shutdown_Platform_backend_
call fcn.00415bf0
cmp dword [ebx + 0x84], 0
je 0x407517
mov ecx, str.Forgot_to_shutdown_Renderer_backend_
call fcn.00415bf0
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 0x407695
cmp byte [ebx + 1], 0
je 0x407695
mov byte [eax + 0x18], 0
mov esi, dword [ebx + 0x2c]
mov dword [ebp - 0x14], esi
test esi, esi
je 0x407695
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0042b9c0
mov ecx, esi
call fcn.0042bbc0
add esi, 0x44
xor edx, edx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], edx
cmp dword [esi], edx
jle 0x40760f
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 0x4075f7
mov ecx, esi
call fcn.0042e440
mov ecx, dword [0x45f4d8]
test ecx, ecx
je 0x4075eb
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 0x4075e1
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 0x407580
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov ecx, esi
call fcn.00401010
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0x5c]
mov byte [eax + 0x20], 0
call fcn.0041e730
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx + 0x50]
call fcn.0041e730
mov ecx, esi
call fcn.0041e730
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [0x45f4d8]
test ecx, ecx
je 0x40768d
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov esi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], esi
je 0x407683
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.00401010
cmp byte [ebx], 0
je 0x407f64
cmp byte [ebx + 0x50e0], 0
je 0x40770c
mov esi, dword [ebx + 0x20]
test esi, esi
je 0x40770c
mov eax, dword [0x45f4d8]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0
mov dword [eax + 0x50e4], 0
call fcn.0041d5e0
mov edx, 0x457980
mov dword [ebp - 0x28], eax
mov ecx, esi
call fcn.00402ac0
mov esi, eax
test esi, esi
je 0x40770c
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 0x40773f
cmp dword [esi + 4], 6
jne 0x407738
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 0x407725
lea ecx, [ebx + 0x3fc0]
xor edx, edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], edx
cmp dword [ecx], edx
jle 0x4077ef
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 0x4077d7
mov ecx, esi
call fcn.00408780
mov ecx, dword [0x45f4d8]
test ecx, ecx
je 0x4077cb
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 0x4077c1
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 0x407760
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x18]
call fcn.00401010
lea ecx, [ebx + 0x3fcc]
call fcn.00401010
lea ecx, [ebx + 0x3fd8]
call fcn.00401010
mov dword [ebx + 0x400c], 0
mov esi, dword [ebx + 0x3fec]
test esi, esi
je 0x40789c
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x3fe8], 0
mov dword [ebx + 0x3fe4], 0
test ecx, ecx
je 0x40788c
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 0x407882
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.00401010
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.00401010
lea ecx, [ebx + 0x494c]
call fcn.00401010
mov esi, dword [ebx + 0x4a70]
test esi, esi
je 0x40798e
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4a6c], 0
mov dword [ebx + 0x4a68], 0
test ecx, ecx
je 0x407976
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x40796c
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 0x407994
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, dword [ebx + 0x4a7c]
test edi, edi
je 0x407a1c
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4a78], 0
mov dword [ebx + 0x4a74], 0
test ecx, ecx
je 0x407a0c
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 0x407a02
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.00401010
lea ecx, [ebx + 0x4ab0]
call fcn.00401010
lea ecx, [ebx + 0x4abc]
call fcn.00401010
mov edi, dword [ebx + 0x4ad0]
test edi, edi
je 0x407ac5
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4acc], 0
mov dword [ebx + 0x4ac8], 0
test ecx, ecx
je 0x407ab5
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 0x407aab
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 0x407b04
xor esi, esi
nop word [eax + eax]
mov ecx, dword [eax]
mov ecx, dword [ecx + esi]
call fcn.0041fef0
inc edi
lea esi, [esi + 4]
lea eax, [ebx + 0x4adc]
cmp edi, dword [ebx + 0x4ad4]
jl 0x407ae0
lea eax, [ebx + 0x4adc]
jmp 0x407b07
mov dword [ebp - 0x24], eax
mov esi, dword [eax]
test esi, esi
je 0x407b87
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4ad8], 0
mov dword [ebx + 0x4ad4], 0
test ecx, ecx
je 0x407b70
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407b66
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 0x407b8d
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4de8]
call fcn.0041e980
mov edi, dword [ebx + 0x4e10]
test edi, edi
je 0x407c20
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4e0c], 0
mov dword [ebx + 0x4e08], 0
test ecx, ecx
je 0x407c10
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 0x407c06
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 0x407ca8
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4e18], 0
mov dword [ebx + 0x4e14], 0
test ecx, ecx
je 0x407c98
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 0x407c8e
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 0x407cd0
xor edi, edi
mov ecx, dword [ebx + 0x4d90]
add ecx, 0x10
add ecx, edi
call fcn.0041e730
inc esi
add edi, 0x1c
cmp esi, dword [ebx + 0x4d88]
jl 0x407cb4
mov esi, dword [ebx + 0x4d90]
test esi, esi
je 0x407d51
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4d8c], 0
mov dword [ebx + 0x4d88], 0
test ecx, ecx
je 0x407d3d
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407d33
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.0041eac0
xor edi, edi
cmp dword [ebx + 0x4da0], edi
jle 0x407d89
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [ebx + 0x4da8]
add ecx, esi
call fcn.0041f7f0
inc edi
add esi, 0x78
cmp edi, dword [ebx + 0x4da0]
jl 0x407d70
mov esi, dword [ebx + 0x4da8]
test esi, esi
je 0x407e0e
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x4da4], 0
mov dword [ebx + 0x4da0], 0
test ecx, ecx
je 0x407df6
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407dec
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 0x407e14
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ecx, [ebx + 0x4dd8]
call fcn.00401010
lea ecx, [ebx + 0x4e94]
call fcn.0041e7d0
lea ecx, [ebx + 0x4e88]
call fcn.0041e8d0
lea ecx, [ebx + 0x5048]
call fcn.00401010
lea ecx, [ebx + 0x5054]
call fcn.00401010
lea ecx, [ebx + 0x4eec]
call fcn.00401010
lea ecx, [ebx + 0x4ef8]
call fcn.00401010
lea ecx, [ebx + 0x4f38]
mov dword [ebx + 0x4f34], 0
call fcn.00401010
lea ecx, [ebx + 0x5100]
call fcn.00401010
mov eax, dword [ebx + 0x50fc]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x407f04
mov ecx, dword [0x45f4d8]
mov dword [ebx + 0x50f8], 0
mov dword [ebx + 0x50f4], 0
test ecx, ecx
je 0x407ef4
movsx edx, word [ecx + 0x524c]
lea eax, [ecx + 0x5250]
mov edi, dword [ecx + 0x3f78]
lea eax, [eax + edx*8]
cmp dword [eax], edi
je 0x407ee7
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 0x407f36
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 0x407f2c
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.00401010
lea ecx, [ebx + 0x51c0]
call fcn.00401010
lea ecx, [ebx + 0x51cc]
call fcn.00401010
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