Function at 0x10012cf0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x34
push ebx
mov ebx, ecx
mov dword [esp + 0x1c], edx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 8]
mov dword [esp + 0x20], 1
sub ecx, dword [eax]
sub ecx, 0x10
sar ecx, 4
sub ecx, edi
je 0x10012fc4
mov esi, dword [ebx + 0x10]
dec ecx
mov dword [esp + 0x2c], ecx
test edi, edi
jle 0x10012d87
mov ecx, edi
shl ecx, 4
add ecx, dword [esi]
cmp ecx, dword [ebx + 8]
jb 0x10012dc1
lea eax, [esp + 0x28]
push eax
push edi
push ebx
call sym.lua53.dll_lua_tolstring
add esp, 0xc
test eax, eax
je 0x10012fd0
cmp dword [esp + 0x20], 0
je 0x10012f9b
push dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
push esi
push 1
push eax
call fcn.1002d552
add esp, 0x10
cmp eax, esi
jne 0x10012f9b
mov eax, 1
jmp 0x10012f9d
cmp edi, 0xfff0b9d8
jle 0x10012d99
mov ecx, edi
shl ecx, 4
add ecx, dword [ebx + 8]
jmp 0x10012dc1
jne 0x10012da3
mov ecx, dword [ebx + 0xc]
add ecx, 0x28
jmp 0x10012dc1
mov eax, dword [esi]
mov ecx, 0xfff0b9d8
sub ecx, edi
cmp dword [eax + 8], 0x16
je 0x10012d3f
mov edx, dword [eax]
movzx eax, byte [edx + 6]
cmp ecx, eax
jg 0x10012d3f
shl ecx, 4
add ecx, edx
cmp ecx, 0x10056510
je 0x10012d3f
mov eax, dword [ecx + 8]
and eax, 0xf
cmp eax, 3
jne 0x10012d3f
test edi, edi
jle 0x10012df4
mov eax, edi
mov ecx, 0x10056510
shl eax, 4
add eax, dword [esi]
cmp eax, dword [ebx + 8]
cmovb ecx, eax
jmp 0x10012e35
cmp edi, 0xfff0b9d8
jle 0x10012e06
mov ecx, edi
shl ecx, 4
add ecx, dword [ebx + 8]
jmp 0x10012e35
jne 0x10012e10
mov ecx, dword [ebx + 0xc]
add ecx, 0x28
jmp 0x10012e35
mov eax, dword [esi]
mov ecx, 0xfff0b9d8
sub ecx, edi
cmp dword [eax + 8], 0x16
je 0x10012e30
mov edx, dword [eax]
movzx eax, byte [edx + 6]
cmp ecx, eax
jg 0x10012e30
shl ecx, 4
add ecx, edx
jmp 0x10012e35
mov ecx, 0x10056510
cmp dword [ecx + 8], 0x13
jne 0x10012ee7
test edi, edi
jle 0x10012e57
mov eax, edi
mov ecx, 0x10056510
shl eax, 4
add eax, dword [esi]
cmp eax, dword [ebx + 8]
cmovb ecx, eax
jmp 0x10012e98
cmp edi, 0xfff0b9d8
jle 0x10012e69
mov ecx, edi
shl ecx, 4
add ecx, dword [ebx + 8]
jmp 0x10012e98
jne 0x10012e73
mov ecx, dword [ebx + 0xc]
add ecx, 0x28
jmp 0x10012e98
mov eax, dword [esi]
mov ecx, 0xfff0b9d8
sub ecx, edi
cmp dword [eax + 8], 0x16
je 0x10012e93
mov edx, dword [eax]
movzx eax, byte [edx + 6]
cmp ecx, eax
jg 0x10012e93
shl ecx, 4
add ecx, edx
jmp 0x10012e98
mov ecx, 0x10056510
cmp dword [ecx + 8], 0x13
jne 0x10012eba
mov eax, dword [ecx]
mov dword [esp + 0x30], eax
mov eax, dword [ecx + 4]
push eax
push dword [esp + 0x34]
mov dword [esp + 0x3c], eax
push str._lld
jmp 0x10012f7d
push 0
lea edx, [esp + 0x34]
call fcn.10028de0
add esp, 4
test eax, eax
jne 0x10012ed5
xorps xmm0, xmm0
movlpd qword [esp + 0x30], xmm0
push dword [esp + 0x34]
push dword [esp + 0x34]
push str._lld
jmp 0x10012f7d
test edi, edi
jle 0x10012eff
mov eax, edi
mov ecx, 0x10056510
shl eax, 4
add eax, dword [esi]
cmp eax, dword [ebx + 8]
cmovb ecx, eax
jmp 0x10012f40
cmp edi, 0xfff0b9d8
jle 0x10012f11
mov ecx, edi
shl ecx, 4
add ecx, dword [ebx + 8]
jmp 0x10012f40
jne 0x10012f1b
mov ecx, dword [ebx + 0xc]
add ecx, 0x28
jmp 0x10012f40
mov eax, dword [esi]
mov ecx, 0xfff0b9d8
sub ecx, edi
cmp dword [eax + 8], 0x16
je 0x10012f3b
mov edx, dword [eax]
movzx eax, byte [edx + 6]
cmp ecx, eax
jg 0x10012f3b
shl ecx, 4
add ecx, edx
jmp 0x10012f40
mov ecx, 0x10056510
cmp dword [ecx + 8], 3
jne 0x10012f52
movsd xmm0, qword [ecx]
movsd qword [esp + 0x38], xmm0
jmp 0x10012f70
lea edx, [esp + 0x38]
call fcn.10028d50
test eax, eax
jne 0x10012f6a
xorps xmm0, xmm0
movsd qword [esp + 0x38], xmm0
jmp 0x10012f70
movsd xmm0, qword [esp + 0x38]
sub esp, 8
movsd qword [esp], xmm0
push str._.14g
push dword [esp + 0x30]
call fcn.1002c9dd
add esp, 0x10
cmp dword [esp + 0x20], 0
je 0x10012f9b
test eax, eax
jle 0x10012f9b
mov eax, 1
jmp 0x10012f9d
xor eax, eax
mov ecx, dword [esp + 0x2c]
inc edi
mov dword [esp + 0x20], eax
test ecx, ecx
jne 0x10012d23
test eax, eax
jne 0x10012fc4
push ecx
push ecx
push ebx
call sym.lua53.dll_luaL_fileresult
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push dword [0x100566b0]
mov edx, edi
mov ecx, ebx
call fcn.10004970
int3