Function at 0x10059000
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20c
mov eax, dword [0x10185cf0]
xor eax, esp
mov dword [esp + 0x208], eax
push esi
mov esi, dword [esp + 0x214]
test esi, esi
jne 0x10059039
lea eax, [esi + 1]
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.101407ce
add esp, 0x20c
ret
mov eax, dword [esi + 8]
push edi
push eax
call sym.leptonlib.dll_sarrayClear
mov eax, dword [esi + 0x2c]
mov edi, dword [sym.imp.MSVCR90.dll__snprintf]
add esp, 4
test eax, eax
je 0x10059078
push eax
push str.set_title__s
lea ecx, [esp + 0x18]
push 0x200
push ecx
call edi
mov eax, dword [esi + 8]
push 1
lea edx, [esp + 0x24]
push edx
push eax
call sym.leptonlib.dll_sarrayAddString
add esp, 0x1c
mov eax, dword [esi + 0x30]
test eax, eax
je 0x100590a4
push eax
push str.set_xlabel__s
lea ecx, [esp + 0x18]
push 0x200
push ecx
call edi
mov eax, dword [esi + 8]
push 1
lea edx, [esp + 0x24]
push edx
push eax
call sym.leptonlib.dll_sarrayAddString
add esp, 0x1c
mov eax, dword [esi + 0x34]
test eax, eax
je 0x100590d0
push eax
push str.set_ylabel__s
lea ecx, [esp + 0x18]
push 0x200
push ecx
call edi
mov eax, dword [esi + 8]
push 1
lea edx, [esp + 0x24]
push edx
push eax
call sym.leptonlib.dll_sarrayAddString
add esp, 0x1c
mov eax, dword [esi + 0x24]
cmp eax, 1
jne 0x100590f2
mov ecx, dword [esi + 0x20]
push ecx
push str.set_terminal_png__set_output__s
lea edx, [esp + 0x18]
push 0x200
push edx
call edi
add esp, 0x10
jmp 0x10059163
cmp eax, 2
jne 0x10059111
mov eax, dword [esi + 0x20]
push eax
push str.set_terminal_postscript__set_output__s
lea ecx, [esp + 0x18]
push 0x200
push ecx
call edi
add esp, 0x10
jmp 0x10059163
cmp eax, 3
jne 0x10059130
mov edx, dword [esi + 0x20]
push edx
push str.set_terminal_postscript_eps__set_output__s
lea eax, [esp + 0x18]
push 0x200
push eax
call edi
add esp, 0x10
jmp 0x10059163
cmp eax, 5
jne 0x1005914f
mov ecx, dword [esi + 0x20]
push ecx
push str.set_terminal_latex__set_output__s
lea edx, [esp + 0x18]
push 0x200
push edx
call edi
add esp, 0x10
jmp 0x10059163
push str.set_terminal_windows
lea eax, [esp + 0x14]
push 0x200
push eax
call edi
add esp, 0xc
mov edx, dword [esi + 8]
push 1
lea ecx, [esp + 0x14]
push ecx
push edx
call sym.leptonlib.dll_sarrayAddString
mov eax, dword [esi + 0x28]
add esp, 0xc
cmp eax, 1
je 0x10059183
cmp eax, 3
jne 0x100591a7
push str.set_logscale_x
lea eax, [esp + 0x14]
push 0x200
push eax
call edi
mov edx, dword [esi + 8]
push 1
lea ecx, [esp + 0x20]
push ecx
push edx
call sym.leptonlib.dll_sarrayAddString
add esp, 0x18
mov eax, dword [esi + 0x28]
cmp eax, 2
je 0x100591b4
cmp eax, 3
jne 0x100591d8
push str.set_logscale_y
lea eax, [esp + 0x14]
push 0x200
push eax
call edi
mov edx, dword [esi + 8]
push 1
lea ecx, [esp + 0x20]
push ecx
push edx
call sym.leptonlib.dll_sarrayAddString
add esp, 0x18
mov eax, dword [esi + 0xc]
push ebp
push eax
call sym.leptonlib.dll_lheapGetCount
add esp, 4
xor ebp, ebp
mov dword [esp + 0x10], eax
test eax, eax
jle 0x100592a2
push ebx
mov ecx, dword [esi + 0x14]
push 0
push ebp
push ecx
call sym.leptonlib.dll_sarrayGetString
mov edx, dword [esi + 0xc]
push 0
push ebp
push edx
mov edi, eax
call sym.leptonlib.dll_sarrayGetString
mov ecx, dword [esi + 0x18]
mov ebx, eax
lea eax, [esp + 0x28]
push eax
push ebp
push ecx
call sym.leptonlib.dll_numaGetIValue
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x34]
add esp, 0x24
cmp eax, 1
jne 0x10059240
mov eax, dword [edx*4 + 0x10183c60]
push eax
push edi
push ebx
push str.plot__s_title__s__s
jmp 0x10059270
test ebp, ebp
jne 0x10059255
mov eax, dword [edx*4 + 0x10183c60]
push eax
push edi
push ebx
push str.plot__s_title__s__s___
jmp 0x10059270
dec eax
cmp ebp, eax
mov eax, dword [edx*4 + 0x10183c60]
push eax
push edi
push ebx
jge 0x1005926b
push str.__s_title__s__s___
jmp 0x10059270
push str.__s_title__s__s
lea ecx, [esp + 0x28]
push 0x200
push ecx
call dword [sym.imp.MSVCR90.dll__snprintf]
mov eax, dword [esi + 8]
add esp, 0x18
push 1
lea edx, [esp + 0x1c]
push edx
push eax
call sym.leptonlib.dll_sarrayAddString
inc ebp
add esp, 0xc
cmp ebp, dword [esp + 0x14]
jl 0x100591f4
pop ebx
mov ecx, dword [esi + 8]
push 1
push ecx
call sym.leptonlib.dll_sarrayToString
mov edx, dword [esi + 4]
push 0x101432bc
push edx
mov edi, eax
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 0x10
mov esi, eax
pop ebp
test esi, esi
jne 0x100592e4
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.101407ce
add esp, 0x20c
ret
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100592f0
push esi
sub eax, edx
push eax
push 1
push edi
call dword [sym.imp.MSVCR90.dll_fwrite]
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
push edi
call dword [sym.imp.MSVCR90.dll_free]
mov ecx, dword [esp + 0x228]
add esp, 0x18
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.101407ce
add esp, 0x20c
ret