Function at 0x489506
Capabilities:
Link many functions at runtime
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], 0
mov dword [esp], str.WINICONV_LIBICONV_DLL
call sub.msvcrt.dll_getenv
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4895fe
mov dword [ebp - 0x10], 0x6fce2a
jmp 0x4895fe
mov dword [esp + 4], 0x2c
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strchr
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x4895e8
cmp dword [ebp - 0x14], 0
jne 0x489575
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov edx, eax
mov eax, dword [ebp - 0x10]
add eax, edx
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub edx, eax
mov eax, edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004894a2
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4895a1
mov eax, 0
jmp 0x48977c
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
cmp dword [ebp - 0xc], 0
je 0x4895e9
mov eax, dword [0x7b5980]
cmp dword [ebp - 0xc], eax
jne 0x48960d
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call eax
sub esp, 4
mov dword [ebp - 0xc], 0
jmp 0x4895e9
nop
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
cmp al, 0x2c
jne 0x4895f8
mov eax, dword [ebp - 0x14]
inc eax
jmp 0x4895fb
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov al, byte [eax]
test al, al
jne 0x489538
jmp 0x48960e
nop
cmp dword [ebp - 0xc], 0
je 0x48975a
mov dword [esp + 4], str.libiconv_open
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x489654
mov dword [esp + 4], str.iconv_open
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
mov dword [esp + 4], str.libiconv_close
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
jne 0x48969e
mov dword [esp + 4], str.iconv_close
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 4], edx
mov dword [esp + 4], str.libiconv
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 8], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
jne 0x4896e8
mov dword [esp + 4], str.iconv
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 8], edx
mov dword [esp + 4], str._errno
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call fcn.004897e1
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], edx
cmp dword [ebp - 0x18], 0
je 0x48975d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x48975d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
test eax, eax
je 0x48975d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x48975d
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [ebp - 0x18]
call eax
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [ebp + 8]
mov eax, dword [eax]
cmp eax, 0xffffffff
je 0x489760
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0x50], edx
mov eax, 1
jmp 0x48977c
nop
jmp 0x489761
nop
jmp 0x489761
nop
cmp dword [ebp - 0xc], 0
je 0x489777
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call eax
sub esp, 4
mov eax, 0
leave
ret