Function at 0x401b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4050c8
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x408008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x48], edi
cmp dword [edi], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
je 0x402276
movaps xmm0, xmmword [0x4062f0]
xor eax, eax
movups xmmword [ebp - 0x80], xmm0
mov dword [ebp - 0x88], 0x57524c44
xor edx, edx
xorps xmm0, xmm0
mov dword [ebp - 0x84], 1
movq qword [ebp - 0x28], xmm0
xor esi, esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], edx
mov ecx, dword [edi + 0x18]
sub ecx, dword [edi + 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [edi + 0x24]
sub eax, dword [edi + 0x20]
sar ecx, 3
sar eax, 3
add eax, ecx
je 0x401bf7
cmp eax, 0x3fffffff
ja 0x402293
push eax
lea ecx, [ebp - 0x28]
call fcn.004023f0
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x64], ecx
jmp 0x401bf9
xor ecx, ecx
mov eax, edx
sub eax, ecx
cmp eax, 4
jb 0x401cdc
mov eax, dword [edi + 0x18]
mov edi, dword [edi + 0x14]
mov dword [ebp - 0x58], eax
cmp edi, eax
je 0x401c66
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ecx], eax
cmp esi, edx
je 0x401c2a
mov eax, dword [edi]
mov dword [esi], eax
add esi, 4
mov dword [ebp - 0x24], esi
jmp 0x401c3d
push edi
push esi
lea ecx, [ebp - 0x28]
call fcn.004024c0
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x48]
lea eax, [esi - 4]
push eax
call fcn.004018c0
mov edx, dword [ebp - 0x50]
add edi, 8
inc dx
mov dword [ebp - 0x50], edx
mov word [ebp - 0x6c], dx
mov edx, dword [ebp - 0x5c]
cmp edi, dword [ebp - 0x58]
jne 0x401c13
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx + 0x24]
mov edi, dword [ecx + 0x20]
mov dword [ebp - 0x58], eax
cmp edi, eax
jne 0x401db3
mov ecx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x48]
sub esi, ecx
sar esi, 2
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x58], 0xfffffffe
mov dword [ebp - 0x50], 4
lea eax, [esi*4]
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x54]
push eax
push ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [edi + 4]
call fcn.00402620
cmp byte [ebp - 0x14], 0
je 0x401cdc
mov eax, dword [ebp - 0x18]
add eax, 0x14
mov dword [ebp - 0x1c], eax
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
movq qword [ebp - 0x40], xmm0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
xor eax, eax
mov byte [ebp - 4], 1
mov dword [ebp - 0x54], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x401e08
push ecx
push eax
lea ecx, [ebp - 0x40]
call fcn.00402b90
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x3c]
je 0x401e08
mov eax, dword [edi + 0xc]
lea ecx, [ebp - 0x40]
push dword [ebp - 0x68]
push eax
push dword [eax]
call fcn.00402750
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x3c]
sub eax, ecx
mov dword [ebp - 0x4c], ecx
sar eax, 2
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x74], eax
shl eax, 2
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x50]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x8c], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x58], 0xfffffffe
push eax
push ecx
lea eax, [ebp - 0x30]
mov dword [ebp - 0x50], 4
push eax
lea ecx, [edi + 4]
call fcn.00402620
cmp byte [ebp - 0x2c], 0
je 0x401e0e
mov eax, dword [ebp - 0x30]
add eax, 0x14
mov dword [ebp - 0x54], eax
jmp 0x401e0e
mov edx, dword [ebp - 0x5c]
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ecx], eax
cmp esi, edx
je 0x401dca
mov eax, dword [edi]
mov dword [esi], eax
add esi, 4
mov dword [ebp - 0x24], esi
jmp 0x401ddd
push edi
push esi
lea ecx, [ebp - 0x28]
call fcn.004024c0
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x48]
lea eax, [esi - 4]
push eax
call fcn.004018c0
mov eax, dword [ebp - 0x44]
add edi, 8
inc ax
mov dword [ebp - 0x44], eax
mov word [ebp - 0x6a], ax
cmp edi, dword [ebp - 0x58]
jne 0x401db0
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x64], ecx
jmp 0x401c7d
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x60], eax
mov eax, dword [edi]
lea edx, [ebp - 0x10]
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x14], 0xfffffffe
mov dword [eax + 8], 0x20
mov eax, dword [edi]
mov esi, dword [eax]
lea eax, [ebp - 0x18]
add esi, 0x20
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x50], esi
mov ecx, eax
mov dword [ebp - 0x80], esi
mov dword [ebp - 0x4c], ecx
cmp eax, edx
je 0x401fcc
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x44], eax
nop
mov eax, dword [ebp - 0x48]
mov edi, dword [ecx]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
jne 0x401ec6
cmp dword [eax + 0x1c], edi
jne 0x401e81
mov edx, dword [eax + 0x18]
cmp edx, 3
jle 0x401e81
lea ecx, [esi - 1]
mov esi, dword [eax + 0x14]
add ecx, edx
neg edx
and ecx, edx
add esi, ecx
mov dword [eax + 0x1c], ecx
mov dword [ebp - 0x80], esi
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
je 0x401ea7
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x401ea3
cmp eax, dword [ecx + 8]
jne 0x401ea3
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x401e93
mov eax, ecx
jmp 0x401ebd
mov eax, ecx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
jne 0x401ebd
mov ecx, dword [edx]
mov eax, edx
mov edx, ecx
cmp byte [ecx + 0xd], 0
je 0x401eb1
cmp byte [eax + 0xd], 0
je 0x401e60
mov dword [ebp - 0x50], esi
mov eax, dword [ebp - 0x48]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
jne 0x401f35
cmp dword [eax + 0x1c], edi
jne 0x401ef0
cmp dword [eax + 0x18], 2
jne 0x401ef0
lea ecx, [esi + 1]
mov esi, dword [eax + 0x14]
and ecx, 0xfffffffe
add esi, ecx
mov dword [eax + 0x1c], ecx
mov dword [ebp - 0x80], esi
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
je 0x401f16
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x401f12
cmp eax, dword [ecx + 8]
jne 0x401f12
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x401f02
mov eax, ecx
jmp 0x401f2c
mov eax, ecx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
jne 0x401f2c
mov ecx, dword [edx]
mov eax, edx
mov edx, ecx
cmp byte [ecx + 0xd], 0
je 0x401f20
cmp byte [eax + 0xd], 0
je 0x401ed4
mov dword [ebp - 0x50], esi
mov eax, dword [ebp - 0x48]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
jne 0x401fa9
cmp dword [eax + 0x1c], edi
jne 0x401f64
mov edx, dword [eax + 0x18]
cmp edx, 1
jg 0x401f64
lea ecx, [esi - 1]
mov esi, dword [eax + 0x14]
add ecx, edx
neg edx
and ecx, edx
add esi, ecx
mov dword [eax + 0x1c], ecx
mov dword [ebp - 0x80], esi
mov ecx, dword [eax + 8]
cmp byte [ecx + 0xd], 0
je 0x401f8a
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x401f86
cmp eax, dword [ecx + 8]
jne 0x401f86
mov eax, ecx
mov ecx, dword [ecx + 4]
cmp byte [ecx + 0xd], 0
je 0x401f76
mov eax, ecx
jmp 0x401fa0
mov eax, ecx
mov edx, dword [eax]
cmp byte [edx + 0xd], 0
jne 0x401fa0
mov ecx, dword [edx]
mov eax, edx
mov edx, ecx
cmp byte [ecx + 0xd], 0
je 0x401f94
cmp byte [eax + 0xd], 0
je 0x401f43
mov dword [ebp - 0x50], esi
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x10]
cmp edi, 0xffffffff
cmove ecx, esi
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x7c], ecx
mov ecx, dword [ebp - 0x4c]
add ecx, 4
mov dword [ebp - 0x4c], ecx
cmp ecx, eax
jne 0x401e50
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x401fd8
mov edi, dword [eax + 8]
jmp 0x401fe2
xor eax, eax
xor edi, edi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x44], edi
test eax, eax
je 0x401ff4
mov eax, dword [eax + 8]
jmp 0x401ff9
xor eax, eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x70], eax
xorps xmm0, xmm0
xor eax, eax
movq qword [ebp - 0x34], xmm0
xor ecx, ecx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x2c], ecx
mov byte [ebp - 4], 2
test esi, esi
je 0x40203c
push ecx
push esi
lea ecx, [ebp - 0x34]
call fcn.00402a80
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], eax
movups xmm0, xmmword [ebp - 0x88]
mov ecx, dword [ebp - 0x48]
movups xmmword [eax], xmm0
movups xmm0, xmmword [ebp - 0x78]
movups xmmword [eax + 0x10], xmm0
mov esi, dword [ecx + 4]
mov esi, dword [esi]
cmp byte [esi + 0xd], 0
jne 0x4020bf
mov edi, dword [ebp - 0x54]
nop
push dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
push dword [esi + 0x10]
add eax, edi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
cmp byte [eax + 0xd], 0
je 0x40209a
mov eax, dword [esi + 4]
cmp byte [eax + 0xd], 0
jne 0x402096
cmp esi, dword [eax + 8]
jne 0x402096
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x402086
mov esi, eax
jmp 0x4020b0
mov esi, eax
mov ecx, dword [esi]
cmp byte [ecx + 0xd], 0
jne 0x4020b0
mov eax, dword [ecx]
mov esi, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x4020a4
cmp byte [esi + 0xd], 0
je 0x402060
mov edi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x60]
test edx, edx
je 0x4021b7
add eax, edi
mov dword [ebp - 0x44], eax
test edx, edx
jle 0x4021b7
nop word [eax + eax]
mov edx, dword [ecx + 4]
mov edi, edx
mov dword [ebp - 0x4c], 0xffffffff
mov ecx, dword [edx + 4]
cmp byte [ecx + 0xd], 0
jne 0x402114
mov eax, dword [eax]
mov eax, dword [eax]
nop dword [eax]
cmp eax, dword [ecx + 0x10]
jae 0x40210b
mov edx, ecx
mov ecx, dword [ecx]
jmp 0x40210e
mov ecx, dword [ecx + 8]
cmp byte [ecx + 0xd], 0
je 0x402100
mov dword [ebp - 0x1c], edx
cmp edx, dword [edi]
je 0x40219a
lea ecx, [ebp - 0x1c]
call fcn.00402350
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x44]
mov ecx, dword [eax + 0x14]
mov esi, dword [esi]
mov edx, dword [eax + 0x10]
add ecx, edx
cmp dword [esi], ecx
jae 0x40219a
mov eax, dword [eax + 0x1c]
mov ecx, edi
sub eax, edx
add eax, dword [esi]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 4]
cmp byte [eax + 0xd], 0
jne 0x40216a
nop dword [eax]
cmp esi, dword [eax + 0x10]
jae 0x40215b
mov edi, eax
mov eax, dword [eax]
jmp 0x40215e
mov eax, dword [eax + 8]
cmp byte [eax + 0xd], 0
je 0x402150
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1c], edi
cmp edi, dword [ecx]
je 0x40219a
lea ecx, [ebp - 0x1c]
call fcn.00402350
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
add ecx, edx
cmp esi, ecx
jae 0x40219a
mov eax, dword [eax + 0x1c]
mov ecx, dword [ebp - 0x14]
sub eax, edx
mov edx, dword [ebp - 0x54]
add eax, esi
mov dword [edx + eax], ecx
jmp 0x40219d
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
mov dword [ecx], eax
mov eax, ecx
mov ecx, dword [ebp - 0x48]
add eax, 4
sub dword [ebp - 0x60], 1
mov dword [ebp - 0x44], eax
jne 0x4020e0
push dword [ebp - 0x68]
mov esi, dword [ebp - 0x54]
push dword [ebp - 0x50]
push 1
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov ecx, dword [ebp - 0x58]
add esp, 0x10
sub ecx, esi
mov eax, esi
cmp ecx, 0x1000
jb 0x4021eb
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402266
push ecx
push esi
call fcn.00404135
mov edx, dword [ebp - 0x40]
add esp, 8
test edx, edx
je 0x40223d
mov ecx, dword [ebp - 0x38]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40221e
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402266
push ecx
push edx
call fcn.00404135
add esp, 8
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov edx, dword [ebp - 0x64]
test edx, edx
je 0x402276
mov ecx, dword [ebp - 0x5c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x40226c
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40226c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404135
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004040f4
mov esp, ebp
pop ebp
ret 0x10
call fcn.004023e0
int3