Function at 0x412320
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418d9d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x48
mov eax, dword [0x421008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
mov eax, ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x38], eax
xorps xmm0, xmm0
test edx, edx
jne 0x412395
movups xmmword [eax], xmm0
mov dword [eax + 0x10], edx
mov dword [eax + 0x14], edx
mov dword [eax + 0x10], 4
mov dword [eax + 0x14], 0xf
mov dword [eax], 0x454e4f4e
jmp 0x4125fc
xor edi, edi
mov esi, 0xf
movups xmmword [ebp - 0x2c], xmm0
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], esi
xor eax, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x34], 0x4225a8
mov dword [ebp - 0x44], 0xd
nop dword [eax]
movsd xmm0, qword [0x41cfb0]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
call sub.api_ms_win_crt_math_l1_1_0.dll__libm_sse2_pow_precise
mov ecx, dword [ebp - 0x30]
cvttsd2si eax, xmm0
test ecx, eax
je 0x412515
cmp byte [0x423f15], 0
je 0x4123f2
sub ecx, eax
mov dword [ebp - 0x30], ecx
cmp esi, 0x10
lea ecx, [ebp - 0x2c]
mov esi, edi
mov edx, 0x41a429
cmovae ecx, dword [ebp - 0x2c]
xor eax, eax
test edi, edi
cmovne esi, eax
sub esi, 4
jb 0x412421
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x412426
add ecx, 4
add edx, 4
sub esi, 4
jae 0x412410
cmp esi, 0xfffffffc
je 0x41245a
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x412453
cmp esi, 0xfffffffd
je 0x41245a
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x412453
cmp esi, 0xfffffffe
je 0x41245a
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x412453
cmp esi, 0xffffffff
je 0x41245a
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x41245a
sbb eax, eax
or eax, 1
jmp 0x41245c
xor eax, eax
test eax, eax
jne 0x412464
test edi, edi
je 0x4124ac
mov edx, dword [ebp - 0x18]
mov eax, edx
sub eax, edi
push 3
push 0x41bd7c
cmp eax, 3
jb 0x412498
cmp edx, 0x10
lea esi, [ebp - 0x2c]
lea eax, [edi + 3]
cmovae esi, dword [ebp - 0x2c]
add esi, edi
mov dword [ebp - 0x1c], eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 3], 0
jmp 0x4124a9
mov byte [ebp - 0x48], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0x48]
push 3
call fcn.0040ac30
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
mov esi, eax
mov dword [ebp - 0x3c], eax
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x4c], ecx
jb 0x4124c5
mov esi, dword [eax]
mov dword [ebp - 0x3c], esi
mov edx, dword [ebp - 0x18]
mov eax, edx
sub eax, edi
push ecx
cmp ecx, eax
ja 0x4124fb
push dword [ebp - 0x3c]
cmp edx, 0x10
lea esi, [ebp - 0x2c]
lea eax, [edi + ecx]
cmovae esi, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
lea eax, [esi + edi]
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x4c]
add esp, 0xc
add eax, esi
mov byte [eax + edi], 0
jmp 0x41250c
push esi
mov byte [ebp - 0x38], 0
push dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040ac30
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x40]
add dword [ebp - 0x34], 0x18
inc eax
sub dword [ebp - 0x44], 1
mov dword [ebp - 0x40], eax
jne 0x4123c0
cmp byte [0x423f15], 0
je 0x4125d4
test ecx, ecx
je 0x4125d4
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x423f70]
cmp eax, dword [ecx + 4]
jle 0x41258c
push 0x423f70
call fcn.00416b9d
add esp, 4
cmp dword [0x423f70], 0xffffffff
jne 0x41258c
push 0x41afd4
push str.debug.log
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
push 0x423f70
mov dword [0x424178], eax
call fcn.00416b53
add esp, 0xc
mov edx, dword [ebp - 0x30]
push str.Item_WearFlag_not_found
push edx
push str.ERROR:___d___s_n
push 0x200
push 0x423f78
call fcn.0040b3e0
mov ecx, 0x423f78
add esp, 0x14
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4125b4
push dword [0x424178]
sub ecx, edx
push ecx
push 1
push 0x423f78
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0x50]
xorps xmm0, xmm0
movups xmmword [eax], xmm0
mov dword [eax + 0x10], 0
movups xmm0, xmmword [ebp - 0x2c]
mov dword [eax + 0x14], 0
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x1c]
movq qword [eax + 0x10], xmm0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004168e6
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret